Splunk Search

How to replace hostnames with own names

svalivarthey
New Member

When i use below query i can see multiple servers in the index.

Index=abc  sourcetype=vmstat (host=windows1* OR  host=windows2* OR host=windows3*) | eval cpu_percent_util=(100-pctIdle) | timechart span=1m avg(cpu_percent_util) by host

i can see graph by windows1, windows2, windows 3 but i want to see the host names like Web1, Web2, Web 3

Please help me on this.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need a way to map from one name to another - how do you know whether windows1 is Web1 or Web2? Is this mapping stored in a lookup somewhere, do you include it in a case statement in the search, can you get it through a join with another search?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...