I am trying to manipulate how Rsyslog sends data to a syslog server on an embedded system that runs Rsyslog version 5. As it is an embedded system there is no option to upgrade to a later version without vendor involvement.
I have the following template:
$template precise,": %HOSTNAME%-dev123: %timegenerated%: %syslogfacility-text%-%syslogpriority%-%syslogtag%%msg%"
In the above example, the text '123' is a serialised asset number that identifies the device. This number is stored in a file and I would like to dynamically fetch this rather than hard-code it to make the rsyslog config more universal and portable within our environment.
As it is pre-version6, advanced templates are not supported that would allow for command substition.
Is there a method available in this version of rsyslog to allow me to do this?