Splunk Search

Is there any specific syntax or regex form that help to identify a end line of any log file?

saibal6
Path Finder

I have different log files but the last line of each files are different and don't know what will come tomorrow. So, is there any specific regex form or command available that can easily identify the end line ??

0 Karma
1 Solution

p_gurav
Champion

Hi,

Assuming that timeseries of events is maintain, you can try this command:

index=<your_data_index_> | stats latest(_raw) AS "last line" by source

View solution in original post

p_gurav
Champion

Hi,

Assuming that timeseries of events is maintain, you can try this command:

index=<your_data_index_> | stats latest(_raw) AS "last line" by source

saibal6
Path Finder

Thanks p_gurav,

I have tried with your command and it's working properly as I want.

0 Karma

p_gurav
Champion

Happy to Help!!

0 Karma
Get Updates on the Splunk Community!

Splunk Lantern | Spotlight on Security: Adoption Motions, War Stories, and More

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

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...