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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...