Getting Data In

How to show the host name from a CSV lookup file when there are no results found?

robwheeler
Engager

I have tried various suggestions from this site but I'm unable to get the desired results.

A 3rd party installs UF's (Universal Fowarders) and provides a csv list of hosts that have been deployed. I have this list loaded into Splunk as a csv lookup file.

What I need to achieve is show the host name from the csv file where there is no match in search results, it also must deal with case insensitive.

The csv is very simple
host,owner,os

The result should be the hosts that are yet to show in the search results so a report can be run and delivered to the vendor to resolve.

What I have tried so far is similar to this, but does not deal with case and I'm not 100% sure its giving accurate results.

| inputlookup uf_deploy.csv | search NOT [search index=*_linux OR index=wineventlog host=* | dedup host | fields host] 

Any help would be great.

Regards

Rob

0 Karma
1 Solution

sundareshr
Legend

Try this

| inputlookup uf_deploy.csv | eval host=lower(host) | search NOT [ | metadata type=hosts index=linux OR index=wineventlog | eval host=lower(host) | fields host ]

View solution in original post

0 Karma

sundareshr
Legend

Try this

| inputlookup uf_deploy.csv | eval host=lower(host) | search NOT [ | metadata type=hosts index=linux OR index=wineventlog | eval host=lower(host) | fields host ]
0 Karma

robwheeler
Engager

Thank you!!

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