Splunk Search

Ho to differentiate fields with same name but different values

gravi
Explorer

I have log messages that have same field names and i am trying to create a table for the dashboard

My messages are:
{
Message:"App Started"
Timestamp: 2019-11-13 23:15:16.436156
},
{
Message:"App Stopped"
Timestamp: 2019-11-13 23:15:18.536156
}

I need to create table with Message, Start time and stop time.

Since both messages has same field name Timestamp, how can eval and differentiate them?

Tried using if(Message="App Stopped") but it always gets me same value for both fields.

Tags (1)
0 Karma

gfreitas
Builder

I have two options for you:

  1. Divide this into two separate events. This would however only works if you have an ID or something that would tie both events together.
  2. Create another field extraction to extract message1, timestamp1, message2, timestamp2

I would try the option 2 before as this would not require re-indexing data etc.

Cheers

0 Karma
Get Updates on the Splunk Community!

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...