[syslog-ng] MongoDB and syslog-ng 3.3 on Centos 5.5

Viacheslav Biriukov v.v.biriukov at gmail.com
Tue Aug 2 23:09:11 CEST 2011


Hello.
Can you help me with syslog-ng 3.3 on the CentoOS 5.5 with MongoDB 1.6
I install syslog-ng version 3.3 where mongodb support exists. But when I add
to the config mongodb destination I get an error:

Starting syslog-ng: Error parsing destination, destination plugin mongodb
> not found in /etc/syslog-ng/syslog-ng.conf at line 70, column 5:
>     mongodb(
>     ^^^^^^^


syslog-ng.conf

@version: 3.3
> #
> # configuration file for syslog-ng, customized for remote logging
> #
> source s_internal { internal(); };
> destination d_syslognglog { file("/var/log/syslog-ng.log"); };
> log { source(s_internal); destination(d_syslognglog); };
> # Local sources, filters and destinations are commented out
> # If you want to replace sysklogd simply uncomment the following
> # parts and disable sysklogd
> #
> # Local sources
> #
> source s_local {
> unix-dgram("/dev/log");
> file("/proc/kmsg" program_override("kernel"));
> };
> #
> # Local filters
> #
> filter f_messages { level(info..emerg); };
> filter f_secure { facility(authpriv); };
> filter f_mail { facility(mail); };
> filter f_cron { facility(cron); };
> filter f_emerg { level(emerg); };
> filter f_spooler { level(crit..emerg) and facility(uucp, news); };
> filter f_local7 { facility(local7); };
> #
> # Local destinations
> #
> destination d_messages { file("/var/log/messages"); };
> destination d_secure { file("/var/log/secure"); };
> destination d_maillog { file("/var/log/maillog"); };
> destination d_cron { file("/var/log/cron"); };
> destination d_console { usertty("root"); };
> destination d_spooler { file("/var/log/spooler"); };
> destination d_bootlog { file("/var/log/boot.log"); };
> #
> # Local logs - order DOES matter !
> #
> log { source(s_local); filter(f_emerg); destination(d_console); };
> log { source(s_local); filter(f_secure); destination(d_secure);
> flags(final); };
> log { source(s_local); filter(f_mail); destination(d_maillog);
> flags(final); };
> log { source(s_local); filter(f_cron); destination(d_cron); flags(final);
> };
> log { source(s_local); filter(f_spooler); destination(d_spooler); };
> log { source(s_local); filter(f_local7); destination(d_bootlog); };
> log { source(s_local); filter(f_messages); destination(d_messages); };
>
> # Remote logging
> source s_remote {
> tcp(ip(0.0.0.0) port(514));
> udp(ip(0.0.0.0) port(514));
> };
> destination d_separatedbyhosts {
> file("/var/log/syslog-ng/$HOST/messages" owner("root") group("root")
> perm(0640) dir_perm(0750) create_dirs(yes));
> };
> log { source(s_remote); destination(d_separatedbyhosts); };
>
>
> #MongoDB
>  destination d_mongodb {
>     mongodb(
>       host("127.0.0.1")
>       port(27017)
>       database("syslog-ng")
>       collection("logs")
>       keys("date", "facility", "level", "host", "program", "pid",
> "message")
>       values("${R_YEAR}-${R_MONTH}-${R_DAY}
> ${R_HOUR}:${R_MIN}:${R_SEC}", "$FACILITY", "$LEVEL", "$HOST","$PROGRAM",
> "$PID", "$MSGONLY")
>     );
>   };
> log { source(s_local); destination(d_mongodb); };
>


In the modules.conf I try to add @afmongodb but this isn't change the
situation.

What's wrong?
-- 
Viacheslav Biriukov
BR
http://biriukov.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20110803/600a67da/attachment.htm 


More information about the syslog-ng mailing list