Can you add username to logs?

Tags:

#1 magneton

Hi All,

Is it possible to use Exec command to add username to logs? If so, can someone point me to resource on how to do it?

Can the same be used to add current assigned IP address?

Regards

Jake

#2 b0ti Nxlog ✓
#1 magneton
Hi All, Is it possible to use Exec command to add username to logs? If so, can someone point me to resource on how to do it? Can the same be used to add current assigned IP address? Regards Jake

Some modules (e.g. im_msvistalog) already add this.

You can do it manually:

<Exec>
  $Username = 'Foo';
  $IPAddress = host_ip();
</Exec>

See the Extracting Data section in the User Guide if you want to parse this information from your logs.