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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...