[syslog-ng] Logging To MongoDB and specifying data types

Gergely Nagy algernon at madhouse-project.org
Fri Jul 27 18:39:36 CEST 2012

Michael Dillon <mdillon at reachmail.com> writes:

> I'm using the syslog-ng windows client to forward IIS logs to syslog-ng.
> I'm using the CSV parser to split it into pairs and pick and choose my
> pairs. I'm not able to figure out how to insert a field from these pairs
> (or any others) into MongoDB as a date time field. They are being stored as
> strings.

Unfortunately, that is a limitation of the MongoDB destination driver,
and currently, there is no way to store anything but strings.

I have a few ideas - and even half-baked solutions - to make it support
other types, but the code is terribly ugly at the moment, and not ready
for general use yet.

I hope I'll be able to enhance the mongodb destination to support at
least the most useful types before 3.4 becomes stable (for 3.3, this
won't happen), help is of course appreciated - even in the form of "I'd
love this feature too!"s :)


More information about the syslog-ng mailing list