Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: how to Remove access_log prefix in syslog (json format)

$
0
0
we can set escape= none to disable escaping double quotations but by a command like this:

log_format graylog_format escape=none $request_final_log;
access_log syslog:server=w.x.y.z:port,tag=,nohostname graylog_format;

still there is a single Colon at the start of my message logs and it causes error on parsing json file without any extractor or regex checking in monitoring server! I wanna know if nginx prepares any command or config to remove all of prefixes in syslog messages?
in others words, I wanna send my logs as json without any prefix like:

{"reqid":"adfw2qwe",...}
{"reqid":"34fsasdsd",...}
{"reqid":"3d34fwffsf",...}

but for now, it sends:

: {"reqid":"adfw2qwe",...}
: {"reqid":"34fsasdsd",...}
: {"reqid":"3d34fwffsf",...}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>