Splunk Search

Help writing a search to count by event type?

archananaveen
Explorer

eventtype=* |stats count by eventtype which works.

However, in a dashboard below query doesn't work. Any suggestions please?

index=$111111$ $22222$ eventtype=* |stats count by eventtype

0 Karma

nickhills
Ultra Champion

I think you want:

(index=$111111$ OR index=$22222$) eventtype=* |stats count by eventtype
If my comment helps, please give it a thumbs up!

DalJeanis
SplunkTrust
SplunkTrust

@nickhillscpl - you may be right. That $22222$ may be the issue, if it is intended to be an index. I'd also be worried about token names that are purely numeric. I didn't find a reference for token naming conventions, but all the examples start with an alpha, and all numeric token names seem potentially problematic.

0 Karma
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 ...