<div dir="ltr"><div><div><div><div>Not right now, but value-pairs does support key transformations (add-prefix and friends), and the same way lowercasing could happen there.<br><br></div>However, someone needs to come up with an implementation, as right now, I don't see when I could get to it.<br><br></div>The required code is in lib/value-pairs/transforms.c, and then its parsing needs to be added to both the cmdline parser (lib/value-pairs/cmdline.c) and the grammar (vp_rekey_options in cfg-grammar.y)<br><br></div>HTH,<br></div>Bazsi<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <br>Bazsi<br></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 11, 2017 at 12:03 AM, Jorge Pereira <span dir="ltr"><<a href="mailto:jpereiran@gmail.com" target="_blank">jpereiran@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div> I am using the 'format-json' as my below snip.</div><div><br></div><div><div>template t_raw2json {</div><div> template("$(format-json --scope selected_macros \</div><div> --exclude TAGS \</div><div> --exclude DATE \</div><div> --exclude PRIORITY \</div><div> --exclude FACILITY \</div><div> --exclude PROGRAM</div><div> )\n");</div><div>};</div></div><div><br></div><div><br></div><div>but, the problem is because sometimes I receive a jSON packet as { "Key": "value" } or {"key": "value}".... this has been a problem to my filter.<br></div><div><br></div><div>e.g:</div><div><br></div><div><div>destination d_nginx_modsec_log {</div><div> file("/var/logs/myapp//${j.<wbr>key:-invalid_key}.log" template(t_raw2json) );</div><div>};</div><div><br></div><div>Question: is it possible to normalize the jSON keys to lowercase? or someone has other approaches?</div><div><div class="m_-5449665980174013260gmail_signature"><div dir="ltr">--<div>Jorge Pereira</div></div></div></div>
</div></div>
<br>______________________________<wbr>______________________________<wbr>__________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/<wbr>mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/<wbr>support/documentation/?<wbr>product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/<wbr>syslog-ng-faq</a><br>
<br>
<br></blockquote></div><br></div>