[syslog-ng] MongoDB destination driver
Gergely Nagy
algernon at balabit.hu
Mon Jan 3 10:38:34 CET 2011
> I agree with Matthew, that it would be really important to make this
> driver "dynamic", as it would be a great tool combined with patterndb
> for reporting without the need to pre-define fields and a dozen of
> destination statements.
Aha! Apologies for being confused before: I have to admit, I never used
patterndb before, and totally forgot about it.
> It is actually not that hard to achieve (again, syslog-ng is a breeze),
> pdbtool does quite the same when emitting all variables, the
> nv_table_foreach() function is there to iterate over all of the
> name-value pairs.
>
> However the NVTable struct stores the builtin and dynamic values
> separately and with a small copy-paste coding in nvtable.c you can grab
> only the dynamic values.
>
> Please find a patch attached that introduces the flags() option for the
> mongodb driver and the auto_nvpairs flag, that inserts all dynamic
> name-value pairs into the DB as well. I'm sure that there's a better way
> to implement some parts of it, so please somebody review and clean up if
> possible :)
The patch looks good on first read, but I'll have a closer look tonight,
and run a quick benchmark aswell, if all goes well.
Thanks!
More information about the syslog-ng
mailing list