5
responses

Hi,
I have to forward tsmlogs to the server, I have below configuration . My audit team needs hostname printed when they receive the logs on their end. I have below configuration

<Output tsmout>
Module om_tcp
Host 10.24.8.23
Port 30133
Exec $FQDN = hostname_fqdn();
# Exec parse_syslog_bsd();
</Output>

<Input tsmlogs>
Module im_file
File "/scripts/tsm/log/tsm.log"
#File "/scripts/tsm/log/" + $FQDN + "-" + "tsm.log"
# Exec $Hostname = hostname_fqdn();
</Input>

<Route tsmroute>
Path tsmlogs => tsmout
</Route>

How do I add hostname when they get forwarded.

AskedJune 2, 2022 - 7:33am

Answer (1)

Hi Tejas,

You can simply call the hostname function to retrieve the hostname of the agent host thus.

Exec       $Hostname = hostname();

Regards

Jeffron

Comments (4)

  • tejas.pandhare's picture

    Hi,

    Is this correct

    <Output tsmout>
    Module om_tcp
    Host 10.24.8.23
    Port 30133
    Exec $Hostname = hostname();
    </Output>

    <Input in2>
    Module im_tcp
    Port 514
    </Input>

    <Input tsmlogs>
    Module im_file
    File "/scripts/tsm/log/tsm.log"
    </Input>

    <Route tsmroute>
    Path tsmlogs => tsmout
    </Route>