Splunk Search

Search by macro name?

blurblebot
Communicator

Is there a way to count events by the name of the macros matched?

Example, I have macros A, B, and C.

Can I do a search of something equivalent to

`A` OR `B` OR `C` | stats count(macro_name)

?

Tags (2)
1 Solution

dwaddle
SplunkTrust
SplunkTrust

Not that I know of. Macros gets interpreted into the search string, and their original identity is pretty much lost. Depending on the complexity of your macro, you could build eventtypes that match it (or even replace it?). Eventtypes do retain their identity through the search and would let you do this.

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

Not that I know of. Macros gets interpreted into the search string, and their original identity is pretty much lost. Depending on the complexity of your macro, you could build eventtypes that match it (or even replace it?). Eventtypes do retain their identity through the search and would let you do this.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...