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!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...