Splunk Search

Lookup Configured, Now I Need More Fields...

aferone
Builder

We are comparing a list of policies (uploaded as a lookup, using "policywithdescs") against our firewall data and determining which policies are NOT being used. Anything with a count of 0 shows us which are not being used. We are using the "policy_id" column in the lookup csv:

index="summary" policy_id=* 
| inputlookup append=t policywithdescs
| rename PolicyID as policy_id
| stats count by policy_id 
| eval count=count-1 
| sort count 

Now, I have added data to the lookup csv, including zone and description information for each policy. This search above shows the "policy_id", then count. How would I add "Zone" and "Description" to each policy_id to the report?

Thanks!

Tags (1)
0 Karma
1 Solution

yannK
Splunk Employee
Splunk Employee

if your extra fields are "Zone" "Description"

index="summary" policy_id=*
| inputlookup append=t policywithdescs
| rename PolicyID as policy_id
| stats count values(Zone) values(Description) by policy_id
| eval count=count-1
| sort count

View solution in original post

yannK
Splunk Employee
Splunk Employee

if your extra fields are "Zone" "Description"

index="summary" policy_id=*
| inputlookup append=t policywithdescs
| rename PolicyID as policy_id
| stats count values(Zone) values(Description) by policy_id
| eval count=count-1
| sort count

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 ...