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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...