Splunk Search

timeseries using an OR text search

chadwell
Explorer

So I have the following search and I want to create a dashboard with separate columns for "Hits" and "Misses".

Seems this should be pretty straightforward but I am lost joins, stats, evals etc:

cf_org_name="ABB" cf_space_name="qa" cf_app_name=*qa-my-app* index=ocf_* "CACHE Hit" OR "CACHE Miss" | timechart span=1d count by type

How can I convert this to a chart with 2 columns which show Hits and Misses per day?

Thanks

Labels (4)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Set the type field based on which string was found in the event.

cf_org_name="ABB" cf_space_name="qa" cf_app_name=*qa-my-app* index=ocf_* "CACHE Hit" OR "CACHE Miss" 
| eval type=if(searchmatch("CACHE Hit"),"Hit","Miss")
| timechart span=1d count by type
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Set the type field based on which string was found in the event.

cf_org_name="ABB" cf_space_name="qa" cf_app_name=*qa-my-app* index=ocf_* "CACHE Hit" OR "CACHE Miss" 
| eval type=if(searchmatch("CACHE Hit"),"Hit","Miss")
| timechart span=1d count by type
---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...