[syslog-ng] connecting to mongodb
Peter Czanik
czanik at balabit.hu
Wed Feb 2 15:45:35 CET 2011
Hello,
When I try to use mongodb, I receive the following error message:
Feb 2 15:33:54 linux-8k4b syslog-ng[9403]: syslog-ng starting up;
version='3.3.0alpha0'
Feb 2 15:33:54 linux-8k4b syslog-ng[9403]: Error connecting to MongoDB;
Feb 2 15:33:54 linux-8k4b syslog-ng[9403]: Error connecting to MongoDB;
Feb 2 15:33:54 linux-8k4b syslog-ng[9403]: Network error while
inserting into MongoDB; time_reopen='60'
The relevant part of my syslog-ng.conf is (taken from an earlier e-mail
on the list):
destination d_mongodb {
mongodb(
host("localhost")
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); };
Version (latest git) compiled on openSUSE factory:
linux-8k4b:/usr/local/etc # /usr/local/sbin/syslog-ng -V
syslog-ng 3.3.0alpha0
Installer-Version: 3.3.0alpha0
Revision:
Compile-Date: Feb 2 2011 14:27:08
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-Sun-STREAMS: off
Enable-IPv6: on
Enable-Spoof-Source: on
Enable-TCP-Wrapper: on
Enable-SSL: on
Enable-SQL: on
Enable-Linux-Caps: off
Enable-Pcre: on
Enable-Pacct: off
linux-8k4b:/usr/local/etc #
Using tcpdump I can't even see a connection attempt. Connecton using
mongodb tools work fine.
linux-8k4b:/usr/local/etc # mongo --version
MongoDB shell version: 1.6.6-pre-
But as packets don't even reach the mongodb server, it's most likely not
a relevant information...
Bye,
--
Peter Czanik (CzP) <czanik at balabit.hu>
BalaBit IT Security / syslog-ng upstream
http://czanik.blogs.balabit.com/
More information about the syslog-ng
mailing list