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!

Admin Your Splunk Cloud, Your Way

Join us to maximize different techniques to best tune Splunk Cloud. In this Tech Enablement, you will get ...

Cloud Platform | Discontinuing support for TLS version 1.0 and 1.1

Overview Transport Layer Security (TLS) is a security communications protocol that lets two computers, ...

New Customer Testimonials

Enterprises of all sizes and across different industries are accelerating cloud adoption by migrating ...