Knowledge Management

Set host tag (tag::host) based on CIDR search

neg
Engager

Hi

Apologies in advance if there already is a similar question/answer (I couldn't find it)

Is there a way of setting tag::host (or some other tag, e.g. tag::client) based on a host search using cidr notation? I'd like to avoid using a lookup table specifying host per line (unless I can use cidr)

Thanks

Tags (1)

Stephen_Sorkin
Splunk Employee
Splunk Employee

You can use eventtypes for this. Eventtypes are fundamentally tags on events defined by a search. Create an eventtype with your CIDR criteria on the field as its search and your events will be tagged appropriately in the "eventtype" field.

southeringtonp
Motivator

You can use a scripted lookup - take a look at this thread for more detail:
     http://answers.splunk.com/questions/5916/using-cidr-in-a-lookup-table

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...