Splunk Search

how to stats count case-insensitively?

William
Path Finder

i have a case to count db operations. in the log file, the format is like:

[time1] op=select data=....
[time2] op=SELECT data=....
...

i can count each operation by the search "index=db | stats count by op". but "select" and "SELECT" are counted as two different ops, so, how to treat them as the same one?

Tags (2)
1 Solution

William
Path Finder

just found the "eval" command to handle this.

index=db | eval op=upper(op) | stats count by op

View solution in original post

William
Path Finder

just found the "eval" command to handle this.

index=db | eval op=upper(op) | stats count by op
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...