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!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...