Splunk Search

Get instance name from source

bcalder
New Member

Hi all,

I am completely new to Splunk so I apologize if this has been asked/answered. I did review the past discussions but could not find a solution to my question.

I have incoming logs that look similar to this

28 Feb 2021 13:53:23,815[MANDATORY][JAS]Initiating EnterpriseOne startup using configuration location (default_path) as 'C:\jde_home\SCFHA\targets\HTML_PD1_82\config'.
 
I would like to be able to search for the string "Initiating EnterpriseOne startup " and create a dashboard table showing the date, time and the substring HTML_PD1_82. The idea being, I would like to keep track of when each machine was restarted.
 
Can anyone help with the Search pattern? Thanks in advance. 
Bruce
Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps this will get you started.

index=foo "Initiating EnterpriseOne startup"
| rex "targets\\\(?<machine>[^\\\]+)"
| table _time machine
---
If this reply helps you, Karma would be appreciated.
0 Karma

bcalder
New Member

Thanks @richgalloway That worked great. I ended up with 

index=* "Initiating EnterpriseOne startup"
| rex "targets\\\(?<machine>[^\\\]+)" | table machine _time
| dedup machine
| sort machine

 

As  newbie, I appreciate your input.

I'm sure there is documentation out there somewhere. Now if I can just find it. ;^o

 

Bruce

0 Karma

richgalloway
SplunkTrust
SplunkTrust
0 Karma
Get Updates on the Splunk Community!

The Payment Operations Wake-Up Call: Why Financial Institutions Can't Afford ...

The same scenario plays out across financial institutions daily. A payment system fails at 11:30 AM on a busy ...

Make Your Case: A Ready-to-Send Letter for Getting Approval to Attend .conf25

Hello Splunkers, Want to attend .conf25 in Boston this year but not sure how to convince your manager? We've ...

Community Spotlight: A Splunk Expert's Journey

In the world of data analytics, some journeys leave a lasting impact not only on the individual but on the ...