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 Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...