Splunk Search

Relating data with time

prettysunshinez
Explorer

Hi,
I would like to view today and yesterday data in the same chart for the required time range.

How can that be done.
Help required!
Thanks!

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You can use the timewrap command to do this, e.g.

index=_internal earliest=-4h
| timechart span=1m count 
| timewrap 1h

and it will generate 4 series, one for each hour on the same chart overlayed on top with the x-axis showing the last hour

0 Karma

to4kawa
Ultra Champion

add |where _time > relative_time(now(), "@d+6h") AND _time < relative_time(now(), "@d+12h")

0 Karma

prettysunshinez
Explorer

@to4kawa I would like to view for any specified Time range.
Time range is not fixed

0 Karma

to4kawa
Ultra Champion

make dashboard and token, so use this logic.

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...