I don't know where you are wanting to store the value, but you could add some config to parse the syslog and then modify one of the fields like $SourceName
or $Message
, for instance.
<Exec>
parse_syslog();
$Message = "NXLog-CE 2.10.2102; " + $Message;
to_syslog_ietf();
</Exec>
Comments (2)
i'm hoping that there is a way for use some variable, not a hardcoded value.
basically i want to know nxlog versons of all the hosts that send log to me.
in NXLog EE, you can use the
nxlog_version()
that b0ti mentioned.NXLog CE does not have that function. An alternative could be to populate a file with the version and include it.
Something like the following, and you could run this from cron maybe.
Then add
include /tmp.test.conf
in yournxlog.conf
.You would reference it as any other define,
%NXVER%
.Note that this is not tested, but it should work.