[syslog-ng] Writing JSON message to a MongoDB destination

Gergely Nagy algernon at balabit.hu
Thu Mar 7 12:31:06 CET 2013


Al Itchon <AItchon at boardreader.com> writes:

> I tried using I'm getting an error trying to use json-parser here:
>
> parser p_json {
>   json-parser(prefix(".json."));
> };
>
> But I get this error:
>
> Error parsing parser expression, parser plugin json-parser not found in /usr/local/etc/syslog-ng.conf at line 38, column 3:
>
>   json-parser(prefix(".json."));
>
> I'm pretty sure I'm using syslog-ng 3.4.1.  Any idea on what I'm
> missing?

You likely do not have the json-parser module installed, which may
easily happen if json-c was not detected when syslog-ng was compiled.

You can check whether you have the module available by running the
following command:

 syslog-ng --module-registry | grep json

This should output something like this:

,----
| Module: json-plugin
|   The json module provides JSON parsing & formatting support for syslog-ng.
|   parser          json-parser
|   template-func   format_json
`----

If it doesn't, then you do not have the module installed, and likely
means it was not compiled, and the most common cause for that is that
the development libraries & headers for the json-c library weren't
installed.

What the name of the package is, depends on the distribution. It's
usually libjson0-dev, libjson-dev, json-c, json-c-dev or something along
these lines.

Hope this helps!

-- 
|8]



More information about the syslog-ng mailing list