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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...