diff --git a/lib/get_next_level b/lib/get_next_level index 973318d..c53894a 100644 --- a/lib/get_next_level +++ b/lib/get_next_level @@ -21,8 +21,8 @@ get_next_level() { nextlevels[level]=$timestamp done } < <( - rrdtool graph /dev/null -s ${first["time"]%:} -e +15y \ - DEF:data=$rrdfile:AP:AVERAGE:step=600 \ + rrdtool graph /dev/null -s -$prevperiod -e +5y \ + DEF:data=$rrdfile:AP:AVERAGE:step=3600 \ VDEF:intercept=data,LSLINT \ VDEF:growth=data,LSLSLOPE \ CDEF:trend=data,POP,COUNT,growth,*,intercept,+ \ @@ -96,7 +96,7 @@ get_next_level() { esac done } < <( - rrdtool graph /dev/null -s ${first["time"]%:} -e +15y \ + rrdtool graph /dev/null -s -$prevperiod -e +5y \ DEF:data=$rrdfile:$stat:AVERAGE:step=600 \ VDEF:intercept=data,LSLINT \ VDEF:growth=data,LSLSLOPE \ diff --git a/settings b/settings index 7af1b91..b2ee412 100644 --- a/settings +++ b/settings @@ -29,7 +29,7 @@ L14color=8B1479 L15color=6B127D L16color=591494 -default_prevperiod=1m +default_prevperiod=1month now=$(date +%s) (( default_start = now - 604800 ))