Reporting

How to Generate a report - 1 field in index against multiple csv lookup fields

splunkster1
Observer

Hello, 

I require a report that can search a csv with multiple fields, against 1 field in  an index. 

The csv contains host data(ip, host, fqdn) in seprate columns. 

The index contains mixed data in the 'host' field. The host field contains ip, host and fqdn values) 

The report needs to generate a list of hosts (from the csv) that have NO EVENTS  logged. 

example csv contents (hosts.csv): 

ip_addresshost_namefqdn
10.1.2.3server1server1.shop.com
179.2.10.5computer1computer.shop.com
186.23.10.50server2server2.shop.com

 

example index events: 

host

10.1.2.3
computer1
computer.shop.com
server2.shop.com
186.23.10.50
Labels (1)
Tags (1)
0 Karma

rupkumar4sec
Path Finder

Try this, Maybe little expensive but should work on a small data set

 | inputlookup yourlookup
 | eval host=mvappend(ip_address,host_name,fqdn)
 | mvexpand host
 | fields host
 | search NOT [ index=<your index> |stats count by host|search count>0|fields host]

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...