I configured a template with regexes for all of the information I want logged:
$template
jsonTemplate,"{%msg:R,ERE,1,BLANK:username=([A-Za-z0-9_-]+)--end:jsonf:msg_username%,%msg:R,ERE,1,BLANK:clientip=([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})--end:jsonf:msg_clientip%,
...}"
and this logs to a file perfectly. However when I log this same info to MongoDB
nothing is logged. I can log a simple, non-json template to MongoDB so I know
the connection works correctly. In the docs it says regexes don't work with
filtering (I had been using if $app-name == 'myapp' then action(...)) and
thought this was the issue, but even when I use the above template with the
very straightforward:
*.* action(type="ommongodb" server="localhost" serverport="27017" uid="rsyslog"
pwd="..." db="..." collection="...")
this does not log to the database. I removed the jsonf formatting of the
template fields as well, but still no luck. What should I be doing differently
here?
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards