Splunk Search

Display multiple events by dates in table format

ezpc98
New Member

Hi,

Our systems have multiple order records as XML transactions and each order can have multiple events on different dates. I want to search for orders that have had specific event codes and display a table to show the dates when each event code happened for that individual order.

Index name is "xmlogs". Each XML has 'order ref', 'event date' and 'event code'. My search needs to be limited to event_code of 1001 or 1002 or 1003.

Input XML looks like:

<orderref>123456</order_ref>

<evendate>2021-10-01T10:31:13</eventdate>

<eventcode>1001</eventcode>

Similar XML will be for event 1002 etc.

I want output to look like:

orderref100110021003
12345601/10/2021 04/10/2021
78912305/10/202108/10/202113/10/2021

 

Any help will be much appreciated.

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Assuming you have already extracted the fields

| where eventcode=1001 OR eventcode=1002 OR eventcode=1003
| xyseries orderref eventcode eventdate
0 Karma
Get Updates on the Splunk Community!

Splunk Classroom Chronicles: Training Tales and Testimonials (Episode 4)

Welcome back to Splunk Classroom Chronicles, our ongoing series where we shine a light on what really happens ...

From GPU to Application: Monitoring Cisco AI Infrastructure with Splunk Observability ...

AI workloads are different. They demand specialized infrastructure—powerful GPUs, enterprise-grade networking, ...

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...