Dashboards & Visualizations

How to show trend for last 7 days for last 3 months

aditsss
Motivator

Hi Everyone,

Below is my query:

index="abc*" OR index="xyz*" | eval raw_len=len(_raw) | eval GB=raw_len/pow(1024,3) | timechart sum(GB) as total_GB by sourcetype

I  am displaying the trend for last 7 days.

Since its a saved search I want to display last 7 days for last 3 months.

Can someone guide me how is that possible.

Thanks in advance

Labels (4)
0 Karma
1 Solution

to4kawa
Ultra Champion

sample:

index=_internal earliest=0 sourcetype=splunkd_*| bin span=1d _time | stats sum(eval(len(_raw))) as bytes by _time sourcetype
| eval KB=round(bytes/1024,2)
| streamstats window=3 avg(KB) as trend by sourcetype
| fields - bytes
| xyseries _time sourcetype KB trend

try bin and stats , not timechart

View solution in original post

to4kawa
Ultra Champion

sample:

index=_internal earliest=0 sourcetype=splunkd_*| bin span=1d _time | stats sum(eval(len(_raw))) as bytes by _time sourcetype
| eval KB=round(bytes/1024,2)
| streamstats window=3 avg(KB) as trend by sourcetype
| fields - bytes
| xyseries _time sourcetype KB trend

try bin and stats , not timechart

Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

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

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...