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!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...