Splunk Search

How do I divide a columns number by two?

elijahm
Explorer

The code belows displays a column showing the amount of times the string "GetPolicy.doPost(56)" occurs. I want to divide this number of occurrences by two and I'm not too sure how to go about doing this. Thanks!

index=client_snsr_tcg_unix_webservices source="/var/log/tomcat8/catalina.out" "GetPolicy.doPost(56)"
| stats count(eval(like(_raw,"%GetPolicy.doPost(56)%"))) as "GetPolicy.doPost(56)" by date_month

Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try adding | eval "GetPolicy.doPost(56)" = 'GetPolicy.doPost(56)' / 2 to the end of the query.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try adding | eval "GetPolicy.doPost(56)" = 'GetPolicy.doPost(56)' / 2 to the end of the query.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...