[syslog-ng] connecting to mongodb
Peter Czanik
czanik at balabit.hu
Wed Feb 2 21:54:21 CET 2011
Hello,
On 02/02/2011 04:55 PM, Gergely Nagy wrote:
>> 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")
>> );
>> };
>>
> That seems correct. Could it be caused by apparmor or some other similar
> thing?
That was also my first thing to check, but there is no firewall or
AppArmor running on the machine.
> If not, I'd appreciate if you could send me a strace of syslog-ng
> (privately, the list would probably reject it anyway).
>
Will do it tomorrow in the morning...
Bye,
CzP
More information about the syslog-ng
mailing list