Splunk Search

How find hosts that are missing a particular sourcetype

omgwut56k
Path Finder

My windows hosts should have 'WinEventLog:Security' and Script:InstalledUpdates.

How can I search for hosts that have Script:InstalledUpdates but is missing 'WinEventLog:Security' ?

Thank you

Tags (3)
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Try this:

| tstats values(sourcetype) as sourcetypes where index=yourindex by host
| search sourcetypes="Script:InstalledUpdates" NOT sourcetypes="WinEventLog:Security"

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Try this:

| tstats values(sourcetype) as sourcetypes where index=yourindex by host
| search sourcetypes="Script:InstalledUpdates" NOT sourcetypes="WinEventLog:Security"

omgwut56k
Path Finder

Thank you!

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...