Dashboards & Visualizations

How to programmatically pull timechart functions for inclusion in a dashboard dropdown

meleschi
Explorer

I am working with a coworker on a dashboard that takes a simple search and automatically shows historical graphs for that search overlaid in the same graph.

To this end, we need to make a dropdown for the timechart functions so we can say what function to graph. While I could define them statically, I'd really like to define the timechart functions programmatically, which will enable us to easily 'port' this dashboard to using other commands (like eventstats, stats, etc) without having to recode our dropdowns.

tldr; Is it possible to pull the available options for timechart via an SPL search for inclusion into an XML dropdown in a dashboard?

0 Karma

to4kawa
Ultra Champion

hi, @meleschi
If you can show us what you want to do, we can answer.

The method is different depending on whether you want to simply put an argument in span = or specify the field to be aggregated.

0 Karma

meleschi
Explorer

On this splunk page, there are a number of Stats functions. I'm asking if I can get a list of these functions via some SPL command so I don't have to hard code them into my dashboard.

https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Timechart

0 Karma

to4kawa
Ultra Champion

I understand. I do not know.

0 Karma

meleschi
Explorer

Thank you for taking the time to check!

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...