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
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...