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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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