xml - nxlog parse_xml() with attributes -
i'm learning nxlog there aren't may examples of parsing xml input in current docs.
my input lines this:
<msg time='2014-06-27t00:27:38' type='error' code='5000' target='some.target' machine='dev-machine' process='2408' thread='160' elapsed='0.00000'>the message.</msg>
i have
<input my_input> module im_file file 'c:\logs\\*.dat' exec parse_xml(); to_json(); </input>
which produces only:
{"eventreceivedtime":"2014-06-27 01:13:28","sourcemodulename":"my_input","sourcemoduletype":"im_file"}
how attributes json fields?
unfortunately there no support parsing xml attributes or nested xml via xm_xml extension module. there xm_perl use kind of complex xml parsing (available linux only).
Comments
Post a Comment