Splunk Search

Sme search with same slot time doesnt returns same number of events

jip31
Motivator

Hi
I have something strange
when I execute the search below, I have 47 events on a one week slot time

eventtype="AppliService" AND (NOT host=E* AND NOT host=I*) Name="MBAMAgent"  State="Stopped" 
| dedup host 
| table _time host DisplayName Name Started State

when I execute the search below on the same slot time, I have only 4 events for MBAMAgent

**eventtype="AppliService" AND (NOT host=E* AND NOT host=I***) (Name="dot3svc" OR Name="WlanSvc" OR Name="Winmgmt" OR Name="LanWlanSwitchingService" OR Name="PCServicesWinSrv" OR Name="CcmExec" OR Name="vpnagent" OR Name="wuauserv"OR Name="RCAgentMgr" OR Name="W32Time" OR **Name="MBAMAgent"** OR Name="BDESVC" OR Name="mfevtp" OR Name="mfemms" OR Name="McAfeeFramework" ) **State="Stopped"** 
| dedup host 
| table _time host DisplayName Name Started State

How is it possible because I use the same searc fields?
Thanks for your help

Tags (1)
0 Karma
1 Solution

cvssravan
Path Finder

That could be because for the same host, there might be multiple Name values. Dedup returns only the latest. So, In order to get the same count for Name=MBAMAgent, you need to add the Name field to dedup command

eventtype="AppliService" AND (NOT host=E* AND NOT host=I*) (Name="dot3svc" OR Name="WlanSvc" OR Name="Winmgmt" OR Name="LanWlanSwitchingService" OR Name="PCServicesWinSrv" OR Name="CcmExec" OR Name="vpnagent" OR Name="wuauserv" OR Name="RCAgentMgr" OR Name="W32Time" OR Name="MBAMAgent" OR Name="BDESVC" OR Name="mfevtp" OR Name="mfemms" OR Name="McAfeeFramework" ) State="Stopped"
| dedup host Name
| table _time host DisplayName Name Started State

View solution in original post

cvssravan
Path Finder

That could be because for the same host, there might be multiple Name values. Dedup returns only the latest. So, In order to get the same count for Name=MBAMAgent, you need to add the Name field to dedup command

eventtype="AppliService" AND (NOT host=E* AND NOT host=I*) (Name="dot3svc" OR Name="WlanSvc" OR Name="Winmgmt" OR Name="LanWlanSwitchingService" OR Name="PCServicesWinSrv" OR Name="CcmExec" OR Name="vpnagent" OR Name="wuauserv" OR Name="RCAgentMgr" OR Name="W32Time" OR Name="MBAMAgent" OR Name="BDESVC" OR Name="mfevtp" OR Name="mfemms" OR Name="McAfeeFramework" ) State="Stopped"
| dedup host Name
| table _time host DisplayName Name Started State

jip31
Motivator

yes it was the issue....... thanks a lot

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Wierd.

Are the extra "*" from trying to making things bold on the forums?

Is it becuase there is no space here: Name="wuauserv"OR

Can you use the job inspector >Search log and compare the lispy?

0 Karma

jip31
Motivator

Ohhhhhhhh.... thanks!

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...