Splunk Search

How to extract,  if log1 - severity =6 then what is the severity in log2, at given point of time?

VijayA
Explorer

Hi All, 

I'm searching 2 different logs, which contain the "Severity" as common field.

I want to extract,  if log1 - severity =6 then what is the severity in log2, at given point of time.

Severity values will be 1-6 only

Ex:

                        Log1                                 Log2

Severity       6                                           3

Kindly help on the same...

Thank you

Labels (4)
0 Karma

VijayA
Explorer

"given point of time" means

ex: on  04/04/23 10:04:05 AM if log1 S=6, what is value of S in log2 at the same time.

                          Log1       Log2

Severity        6                  3

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

So, if you have an event in log 1 at 04/04/23 10:04:05 AM, are you expecting there to be an event in log 2 at exactly the same time? Down the second, or even millisecond?

0 Karma

VijayA
Explorer

Yes, Down the second, will be good

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

This may not give you what you want, but might be close to what you have asked for

| bin _time span=1s
| chart latest(severity) by _time log

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What do you mean by "at given point of time"?

Assuming you already have the logs ingested into Splunk, there are most likely stored as a series of events. Hopefully, these events will have a timestamp which is extracted and tagged to event. Splunk can then process these events in a pipeline of events returned by a search. It is essentially processing one event at a time. In order to compare values from more than one event, they have to be brought together (often by a stats command), so that these stats events can be processed (one at a time).

How do you want to bring your events from the two logs together?

0 Karma

VijayA
Explorer

Hi,

I already have logs in splunk from both log1 and log2 as events, they have timestamps as well

I do have 4 other fields in common and using JOIN to combine the fields.

but I'm unable to compare the if S=6 in Log1, what is the S value in Log2 

Please provide some comparison steps. 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You haven't answered the central question - what do you mean by "given point of time"?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...