I am trying to add a custom tag message in front of the logs similar to rsyslog custom tagging, but couldn't find a module on tagging logs.
The solution in te previous forum on tagging didn't work out.


Solution in that forum : Exec $tag = 'hl7out';

Does custom tagging works for AIX ? Please provide a solution for it to reflect it in forwarded logs.

AskedJuly 1, 2019 - 5:29pm

Answer (1)

The short answer is, yes. Adding fields works for any OS. That is a built-in feature of the language NXLog uses.
The longer answer is: How you incorporate these fields will depend on your configuration.
Some modules will only use $raw_event by default and will need to be transformed or repackaged.

It may be helpful to show some of your config and what you are trying to accomplish.

AnsweredJuly 1, 2019 - 7:31pm

Comments (2)

  • nkhljaiswal's picture

    Hi, Please find the testing config I applied.

    <Input in>
    Module im_file
    File "/var/log/test/*.log"

    <Output out>
    Module om_udp
    Port 514

    <Route 1>
    Path in => out

    The custom logs are forwarded and logs are received. But I would like to know how tagging is inserted into this code.

    July 9, 2019 - 2:07pm