All Apps and Add-ons

How to use $HOSTNAME Linux environment variables in forwarder's inputs.conf to identify servers by hostname?

ivangutev
Engager

Hello,

I am trying to use the $HOSTNAME Linux environment variable in inputs.conf of splunkforwarder, because I would like to identify servers by hostname. I wonder is that possible and how, because I have tried already to set a HOST variable and to pass the content into host = $(HOST)-webserver but somehow that is not working.

Can you help me please?

Thanks,
Ivan

0 Karma
1 Solution

ivangutev
Engager

I found a solution. If I do not set the host in inputs.conf, it will use the hostname of the server and therefore I can identify it this way.

View solution in original post

0 Karma

ivangutev
Engager

I found a solution. If I do not set the host in inputs.conf, it will use the hostname of the server and therefore I can identify it this way.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...