The trendline is computed over 7 days.

Monitoring the trend

Home | Household | Office | Cooling | Datacentre | Monitoring

Using the rrdgraph tool and the data recorded in the RRD database, it is easy to compute the trend over a given time period, e.g. the last 30 days. Adding that trend to a chart (using rrdgraph TREND) is also easy, but how about monitoring that trend?

Fortunately, using the LSLSLOPE function/variable, that is also easy:

rrdtool graph slope.txt --start -30d --end now --step 86400 \
        DEF:total=rrdfile:cnt1:AVERAGE \
        VDEF:slp1=total,LSLSLOPE \

The above produces output such as this (in slope.txt), showing a minor downwards trend:


Determining when to issue an alarm can be complicated. You don't want too many or unnecessary alarms, but you do want the important ones. I like to look at longer term (30-180 days) trends that change sign, from positive to negative or vice versa, as well as short term trends exceeding a preset threshhold. Using a cronjob, I generate a trend once day, alarms I typically generate by email, sometimes as SNMP traps.

Hosting facilities kindly provided by Hostsuisse. Made in Switzerland