Knowledge Management

Need to assign ip address to a description

yepyepyayyooo
New Member

I need to create a new field called ip_address_location and for each IP address perform an if. So like this:

if ip = "1.1.1." assign "site_abc" in ip_address_location
if ip = "1.1.2.
" assign "site_efg" in ip_address_location

etc.

Any suggestions?

Tags (1)
0 Karma

nickhills
Ultra Champion

A lookup is the ideal solution to this.

Specifically with a cidr match:
See this:
https://answers.splunk.com/answers/5916/using-cidr-in-a-lookup-table.html

If my comment helps, please give it a thumbs up!

yepyepyayyooo
New Member

Unfortunately, I do not have permission to modify configuration files.

0 Karma

nickhills
Ultra Champion

If you have permission to upload a lookup csv file, you can do the rest of the process via the UI

Upload CSV
https://docs.splunk.com/Documentation/Splunk/8.0.1/Knowledge/Usefieldlookupstoaddinformationtoyourev...

Define Lookup
https://docs.splunk.com/Documentation/Splunk/8.0.1/Knowledge/Usefieldlookupstoaddinformationtoyourev...
Pay attention to Match type

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...