OSSEC文档——输出告警到PostgreSQL

OSSEC文档——输出告警到PostgreSQL,第1张

概述翻译: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 r 翻译: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:Shall the new role be allowed to create more new roles? (y/n) nCREATE RolE
创建数据库
$ sudo -u postgres createdb -O ossec_user ossecdbCREATE DATABASE
创建必要的表
$ psql -h 127.0.0.1 -U ossec_user -d ossecdb -f postgresql.schema
OSSEC设置

在/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
总结

以上是内存溢出为你收集整理的OSSEC文档——输出告警到PostgreSQL全部内容,希望文章能够帮你解决OSSEC文档——输出告警到PostgreSQL所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1171425.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存