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

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...