[syslog-ng] MongoDB destination driver

Gergely Nagy algernon at madhouse-project.org
Thu Dec 30 21:51:59 CET 2010


> Good work. I am wondering if support for MongoDB must be added to the
> core code or if it could also be added as a libdbi driver which could be
> used in more than just syslog-ng.

While the inserting code is very similar, and could be added to
libdbi, the query code is very different. I do not think that adding
it to libdbi would work.

But to be honest, even the inserting code is different enough to make
it tricky at best, to add it to libdbi.

> I am wondering if it would be possible to take advantage of MongoDB's
> dynamic nature, and log all of the defined name-value pairs in a
> message, or of a list of name-value pairs.

Not adding empty values is certainly possible, I'll add support for
that shortly. Thanks for the suggestion!

It already is possible to log only selected name-value pairs:

destination d_mongodb { mongodb(keys("host", "message")
values("$HOST", "$MSGONLY")); };

Though, if one is empty, it will still be added to the store at the
moment, but like I said, I'll fix that shortly.


More information about the syslog-ng mailing list