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!

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...

Splunk and TLS: It doesn't have to be too hard

Overview Creating a TLS cert for Splunk usage is pretty much standard openssl.  To make life better, use an ...

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...