Splunk Search

How to select a time range in a timechart?

jip31
Motivator

Hello

Is it possible to use a select time range directly in a timechart?
it means that I would like to use the select time range between tags
i would also like to have the possibility to modify the span value directly in the panel
could you help me pelase

0 Karma

koshyk
Super Champion

hi mate,

just double checking my understanding. Do you want the "earliest and latest" to be modified dynamically or . "span" within timechart?

In dashboard, each of them can be put as a token in drop down (or any fields)
=> For earliest and latest, you need to amend at base search level

index=* sourcetype=somesourcetype earliest=$myearliest$ latest=$mylatest$ | timechart ...

=> If you want to amend span, then do the same for $span$

index=* sourcetype=somesourcetype | timechart span=$myspan$ count by something

https://docs.splunk.com/Documentation/Splunk/7.2.6/Viz/tokens

0 Karma

jip31
Motivator

HI
Thanks but my exact question is to know if its possible to "play" with earliest=$myearliest$ latest=$mylatest$ or span=$myspan$ directly in the timechart???

0 Karma

twesty
Path Finder

Take a look here. There are examples within demonstrating the behaviour I believe you are after

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Where is the link?

---
If this reply helps you, Karma would be appreciated.
0 Karma

twesty
Path Finder

Sorry, for some reason it was taken off my answer. https://docs.splunk.com/Documentation/Splunk/latest/Viz/Chartcontrols

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...