[syslog-ng] Mongodb

Gergely Nagy algernon at balabit.hu
Wed Nov 27 16:19:20 CET 2013


Nilo Cabeza Diaz <nilocd at fcsh.upr.edu.cu> writes:

> how send log to mongodb???
>
> this is what I do in syslog-ng.conf and does nothing for me
>
> destination d_dw_v3_mongo {
>      mongodb(
>          host("localhost")
>          port(27017)
>          database("syslog")
>          collection("messages")
>          value-pairs(
>              key("ISODATE")
>              key("PRIORITY")
>              pair("svc_id" "${.SDATA.syslog at 0.svcid}")
>              pair("tid" "${.SDATA.syslog at 0.tid}")
>              pair("act_id" "${.SDATA.syslog at 0.id}")
>              pair("act_eid" "${.SDATA.syslog at 0.eid}")
>              key("MESSAGE")
>              key("SDATA")
>              key("HOST")
>
> );
>
> };

This should work by the looks of it. You can consult either the MongoDB
server logs to see if anything is wrong, or run syslog-ng in debug mode
(-Fvde) and see if it complains about something.

-- 
|8]



More information about the syslog-ng mailing list