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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...