You are not logged in.
Hi,
I'm trying to follow the wiki guide https://wiki.archlinux.org/index.php/Sy … estination to output syslog messages to a postgres database. However, I get the following error.
$ /etc/rc.d/syslog-ng restart
:: Stopping Syslog-NG [DONE]
:: Starting Syslog-NG [BUSY] Error parsing destination, destination plugin sql not found in /etc/syslog-ng/syslog-ng.conf at line 46, column 3:
sql(type(pgsql)
^^^
syslog-ng documentation: http://www.balabit.com/support/document … =syslog-ng
mailing list: https://lists.balabit.hu/mailman/listinfo/syslog-ng
It looks like the sql plugin is not loaded. I have uncommented the last line of /etc/syslog-ng/modules.conf which contains (@module afsql) but that didn't help. Also looking through the output of pacman -Ql syslog-ng I don't see the sql plugin anywhere. Maybe it isn't included in arch? I also don't see an sql plugin for syslog-ng anywhere in the repos or AUR.
Here is what I've added to /etc/syslog-ng/syslog-ng.conf:
destination d_pgsql {
sql(type(pgsql)
host("127.0.0.1") username("logwriter") password("password")
database("syslog")
table("logs_${HOST}_${R_YEAR}${R_MONTH}${R_DAY}") #or whatever you want, example ${HOST}" for hosts, ${LEVEL}" for levels.. etc
columns("datetime varchar(16)", "host varchar(32)", "program varchar(8)", "message varchar(200)")
values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSG")
indexes("datetime", "host", "program", "pid", "message"));
};
I've also run pacman -Syu yesterday so I'm using syslog-ng 3.2.2-1
Last edited by bostonvaulter (2011-03-01 19:13:39)
Offline