#!/bin/bash RRDTOOL=/usr/bin/rrdtool STATSDIR=/var/www/wan-stats/ # DS : Name : Type : Heartbeat : Min : Max # RRA : AVERAGE : Xff : Steps : Rows # 5 minutes is 300 seconds # 1 Day is 288 5-minute intervals # 1 Week is 2016 5-minute intervals $RRDTOOL create "wan-ping.rrd" --step 300 \ DS:lnk:GAUGE:1200:U:U \ DS:www:GAUGE:1200:U:U \ DS:res:GAUGE:1200:U:U \ DS:shl:GAUGE:1200:U:U \ RRA:AVERAGE:0.5:1:288 \ RRA:AVERAGE:0.5:1:2016 mv -f "wan-ping.rrd" $STATSDIR