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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...