I am using rsyslog to send all syslog files and few additional application log files to remote syslog server which has syslog-ng server running and it's sending to Splunk using splunk forwarder. My problem is, when rsyslog sending logs to remote syslog server (syslog-ng), in log events it's adding Timestamp and Hostname to it. How do I tell rsyslog to don't add Timestamp and Hostname to any log events? based on my findings, there is a template in rsyslog.conf. where we can define format and other things about log events. I tried that but it didn't work.
in my rsyslog.conf I have entry for template as,
$template noTimeStampFormat,"%syslogtag% %msg%\n"
$ActionFileDefaultTemplate noTimeStampFormat
I restarted syslog service, this change didn't work.
can someone please help me here on how to fix this?
Currently events looks like
<timestamp> <hostname> <tag> sudo: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Ideal would be,
<tag> sudo: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Thanks in advance!