Getting Data In

Exclude field values from other field

marco_massari11
Communicator

Hi,

I have some sylog events, login failed and login success in particular. I can determine if the event is success or failed by a field (field1) which contain something like "success" or "failure". In the event I Have also a field mac_address(field2) which contain some MAC address. I need to count the number of mac address that exist in failure but nerver exist in success.

Can you help me???

 

Thanks in advance

Labels (3)
0 Karma
1 Solution

somesoni2
Revered Legend

Try something like this:

index=foo  sourcetype=bar 
| stats values(field1) as status by field2
| where mvcount(status)=1 and status="failure"

View solution in original post

somesoni2
Revered Legend

Try something like this:

index=foo  sourcetype=bar 
| stats values(field1) as status by field2
| where mvcount(status)=1 and status="failure"

marco_massari11
Communicator

Hi somesoni2,

thank you so much for your answer, I think it's working. So the result is the list of mac address that never had a login success, right? And if I want a count of this result, what I need to add to the query?

Thank you so much

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...