Splunk Search

How do you find the difference between the count of 2 keywords?

abhishekgandhe
Explorer

I have 2 keywords.
"UniSim Job received" and "UniSim Job Run completed successfully".

I want to find the difference between the count of these 2 keywords.

0 Karma
1 Solution

nagarjuna280
Communicator

try this, replace "action" with your field name

|stats count(eval(action="UniSim Job received")) as abc count(eval(action="UniSim Job Run completed successfully")) as abcd | eval diff=abc-abcd

View solution in original post

0 Karma

nagarjuna280
Communicator

try this, replace "action" with your field name

|stats count(eval(action="UniSim Job received")) as abc count(eval(action="UniSim Job Run completed successfully")) as abcd | eval diff=abc-abcd

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@abhishekgandhe

Can you please share some more information?? like, what are your events and what is your expected output.

Thanks

0 Karma
Get Updates on the Splunk Community!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...