Dashboards & Visualizations

In Splunk dashboard - I should be able to get logs before the last occurrence of a text msg.

kirti_gupta12
Path Finder

I have a Splunk Dashboard. It has a text field named "Error msg" and a Time-Picker. (Image - "Dashboard items"). 

If the text field "Error msg" is empty, I am able to display all the logs within the given time frame. 

Query : 

 

index=AppIndex cf_app_name=AppName msg!="*Hikari*" taskExecutor- | fields _time msg | sort -_time | 
| table _time msg

 

Now, If I enter a log message in the text field "Error msg", my goal is, for the given time frame,

1. Search all the occurrences of this "Log message".
2. Get the latest occurrence. 
3. In the output table, print the logs right before the last occurrence of the msg. 

In this way, user can trace the error msg and look at the logs (right before the error in the text field) to find what caused the error to happen. 

Any suggestions on how this can be done via a query?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...