Dashboards & Visualizations

Count number of occurrences inside an event

msarro
Builder

Hi everyone. I am working to analyze an XML output file from a vendor application we use. Inside, there is an element called <row>, and within that there can be 3 child leaves. A single output file can include several thousand of these <row> elements. How can I count the number of times <row> appears in a single event?

Tags (1)
1 Solution

cramasta
Builder

You can use rex to extract the values of each row element. You also need to use the rex setting max_match=0 (This will extract multiple values with in a single event that match the regex). You can than use the eval mvcount function to count the number of values in that extracted field.

View solution in original post

cramasta
Builder

You can use rex to extract the values of each row element. You also need to use the rex setting max_match=0 (This will extract multiple values with in a single event that match the regex). You can than use the eval mvcount function to count the number of values in that extracted field.

Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...