Splunk Search

How to apply operator on a specific value in a table?

dyeo
Engager

I'm trying to divide a specific value in a table by 10. What is the best way to do this?

My search:
(index=Wineventlog sourcetype="WinEventLog:security" EventCode=4740 OR (action=failure EventCode=4625 host=eee OR host=xyz (Failure_Reason="Unknown user name or bad password.")) OR (host=asd (EventCode=516 OR EventCode=411) NOT clientIP=10.10.10.10) NOT user="-") OR (index=fff sourcetype=www action=failure)
| eval output=coalesce(userMsg, lockoutUser, user, sAMAccountName)
| eval descrip=case(EventCode=4625, "A", EventCode=4740, "B", EventCode=411, "C", EventCode=516, D", EventCode="AVEN-FAIL", "E")
| stats dc(output) as count by descrip

I would like to divide only the count value in row B by 10. Is this possible?

Thank you!

Tags (3)
0 Karma
1 Solution

woodcock
Esteemed Legend

Just add this:

... | eval count=if(descrip="B", count/10, count)

View solution in original post

0 Karma

woodcock
Esteemed Legend

Just add this:

... | eval count=if(descrip="B", count/10, count)
0 Karma

dyeo
Engager

Thanks, that worked!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

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