Splunk Search

Use of Outputlookup results in further search

prsshini
New Member

I am trying to find the list of packages installed in all hosts. if any host doesnt have that package installed, I am trying to find those hosts as well. I am using outputlookup and inputlookup to achieve this.

index=module sourcetype=packages_installed source="InstalledSoftware" host="Comp*names" | dedup host | stats list(host) | outputlookup hosts.csv | append [search index=module sourcetype=packages_installed source="InstalledSoftware" pkgName= package1 | dedup host, Name | stats list(Host) count(host) by Name, Version ]

This gives me list of all the hosts(total 100hosts) in top
and list of hosts where packages are installed (70) in the bottom frames.

how can i find the missing 30 hosts that do not have that package installed.

i tried using Set diff [search1] [search2] and dont find it helpful.

Any help is much appreciated.

0 Karma

jkat54
SplunkTrust
SplunkTrust

Does this work?

index=module sourcetype=packages_installed source="InstalledSoftware" host="Comp*names" 
| eval packageInstall=if(pkgName=="package1","True","False")
| stats values(packageInstall) as "Package Installed"  by host Name Version
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Enhance Security Operations with Automated Threat Analysis in the Splunk EcosystemAre you leveraging ...

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...