Dashboards & Visualizations

Why is Splunk query to extract string inside XML tag not working with spath command?

maximusdm
Communicator

I am using the following query:

index=itx "PAD =" | dedup BOC | spath output=Channel path=AsRunMessage.Header.Channel  | table BOC, channel

which results in events with big XML content .. I need to extract the string "ITX1546" from inside the tags.

Also, I need to create a table with distinct rows containing unique BOC values.

The Channel field is not being populated.

Here is the XML structure:

alt text

Any ideas? Thank you

0 Karma
1 Solution

maximusdm
Communicator

found my own answer.. .rex "]+>(?[^<]+)"

View solution in original post

0 Karma

maximusdm
Communicator

found my own answer.. .rex "]+>(?[^<]+)"

0 Karma

maximusdm
Communicator
rex "<Channel [^>]+>(?<Channel>[^<]+)"
0 Karma
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, ...