Splunk Search

I would like show sparkline from outputlookup table

karn
Path Finder

I would like to improve search performance by preload data into csv or kv-store with sparkline. How do I display sparkline back when I use command inputlookup ?

Thank you

Tags (1)
0 Karma

niketn
Legend

@karn community would be able to assist you better if you provide more details as to what your current sparkline looks like and what is the data and Splunk query used.

Assuming you are having hourly sparkline. Following is a run anywhere example from Splunk's _internal index:

index=_internal sourcetype=splunkd log_level!=INFO
| stats sparkline(count,1h) as trend by component

In order to save the results of hourly stats. You need to breakdown the process in two parts:

Step 1: Send to outputlookup with hourly aggregate

index=_internal sourcetype=splunkd log_level!=INFO
| bin _time span=1h
| stats count by _time component
| outputlookup test.csv

Step 2: Get sum() of count per hour as sparkline. Use span as 1h for sparkline

| inputlookup test.csv
| stats sparkline(sum(count),1h) as trend by component

Please try out and confirm!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...