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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...