#!/bin/sh #------------------------------------------------------------------------------ # OPT_RRDTOOL /etc/rrdtool/ping6.rrd __FLI4LVER__ # Creation: bastard # Last Update: $Id$ #------------------------------------------------------------------------------ [ -z "$RDTOOL_CONF_LOADED" ] && . /var/run/rrdtool.conf . /etc/rrdtool/rrdtool-helper [ "$RRDTOOL_N" -eq 0 ] || for idx in `seq 1 $RRDTOOL_N` do eval local source='$RRDTOOL_'$idx'_SOURCE' eval local length='$RRDTOOL_'$idx'_OPTIONS_N' if [ "$source" = "ping6" ] then for idy in `seq 1 $length` do eval item='$RRDTOOL_'${idx}'_OPTIONS_'${idy} local db_file=$RRDTOOL_DB_PATH/$source/$item.rrd if [ ! -f $db_file ] then echo 'creating new database for "'$source'" - "'$item'"' rrdtool create $db_file --step 60 \ DS:min:GAUGE:$heartbeat:0:U \ DS:avg:GAUGE:$heartbeat:0:U \ DS:max:GAUGE:$heartbeat:0:U \ RRA:AVERAGE:0.5:1:1500 \ RRA:AVERAGE:0.5:10:1100 \ RRA:AVERAGE:0.5:30:1600 \ RRA:AVERAGE:0.5:720:800 else rrdheartbeat_change fi done fi done