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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...