我无法使用syslog-ng

时间:2018-11-14 15:02:36

标签: database postgresql syslog-ng

destination d_pgsql {
 sql(type(pgsql)
 host("ip.of.you.host") username("logwriter")
 password(“logwriterpassword") port("5432")
 database("syslog")
 table("logs_${HOST}_${R_YEAR}${R_MONTH}${R_DAY}")
 columns("datetime varchar(16)", "host varchar(32)", "program varchar(20)", "pid
 varchar(10)", "message varchar(800)")
 values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSG")
 indexes("datetime", "host", "program", "pid", "message"));
 };

log { source(src); destination(d_pgsql); };

尝试重新启动时,syslog-ng收到错误:

[2018-11-14T15:38:57.863699] Unable to initialize database access (DBI); rc='-1', error='No such file or directory (2)'
[2018-11-14T15:38:57.863877] Error initializing message pipeline; plugin_name='sql', location='/usr/local/etc/syslog-ng.conf:49:5'
/usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng

我已经阅读了Internet上的其他帖子,每个人都建议检查是否已安装libdb。我有那会是什么呢?我没有一个主意了。我正在使用FreeBSD。

0 个答案:

没有答案