OSSEC文档——输出告警到PostgreSQL
发布时间:2020-12-13 16:41:49 所属栏目:百科 来源:网络整理
导读:翻译:http://ossec-docs.readthedocs.io/en/latest/manual/output/pgsql-database-outout.html 输出告警到PostgreSQL 数据库设置 在pgsql中创建ossec用户 $ sudo -u postgres createuser -D -A -P ossec_userEnter password for new role:Enter it again:Sh
翻译:http://ossec-docs.readthedocs.io/en/latest/manual/output/pgsql-database-outout.html
输出告警到PostgreSQL 数据库设置 在pgsql中创建ossec用户 $ sudo -u postgres createuser -D -A -P ossec_user Enter password for new role: Enter it again: Shall the new role be allowed to create more new roles? (y/n) n CREATE ROLE创建数据库 $ sudo -u postgres createdb -O ossec_user ossecdb CREATE DATABASE创建必要的表 $ psql -h 127.0.0.1 -U ossec_user -d ossecdb -f postgresql.schemaOSSEC设置 在/var/ossec/etc/ossec.conf添加<database_output>标签 <ossec_config> <database_output> <hostname>192.168.2.30</hostname> <username>ossecuser</username> <password>ossecpass</password> <database>ossec</database> <type>postgresql</type> </database_output> </ossec_config> 启用数据库守护进程,并重新启动ossec,以使更改生效 # /var/ossec/bin/ossec-control enable database # /var/ossec/bin/ossec-control restart (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |