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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...