All Apps and Add-ons

Categorize host_names based on list

mmacdonald70
Explorer

I apologize if this has been answered before. I couldn't find it anywhere.

I am trying to use the Nagios addon and app to create some reports for management. At the moment, I am working on Ping availability. The issue that I have is that we would like to only include a specific group of devices in these reports.

Is there a way to add a field or tag to this data so that:

if hostname = (device1 or device 2 or device 2) set TAG=LOCATION1
if hostname = (device3 or device4) set TAG = LOCATION2
else set TAG = OTHER

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

I would add a lookup for this purpose. You could then do

hostname,categorytag
device1,LOCATION1
device2,LOCATION1
device3,LOCATION2
device4,LOCATION2
*,OTHER

That last line needs the WILDCARD option in your transforms.conf definition.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...