blob: e233d128f6fb9a977309c3e1b0e9bf6ca4450ae4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#! /bin/sh
set -e
RRD_DIR=$1
TARGETDIR=$2
if [ -z "$TARGETDIR" ] ; then
echo "Usage: $0 <rrd_dir> <target_dir>" >&2
exit 1
fi
rrdtool graph $TARGETDIR/remailer-states-long.png \
--start `date --date='12 month ago' +%s` \
--title 'Number of Remailers/Mixmasters' \
--vertical-label '#' \
--lower-limit 0 \
--height 150 \
DEF:ok1=$RRD_DIR/remailer-states.rrd:state1OK:AVERAGE \
DEF:warn1=$RRD_DIR/remailer-states.rrd:state1Warning:AVERAGE \
DEF:crit1=$RRD_DIR/remailer-states.rrd:state1Critical:AVERAGE \
DEF:ok2=$RRD_DIR/remailer-states.rrd:state2OK:AVERAGE \
DEF:warn2=$RRD_DIR/remailer-states.rrd:state2Warning:AVERAGE \
DEF:crit2=$RRD_DIR/remailer-states.rrd:state2Critical:AVERAGE \
"AREA:ok2#00FF00:in OK (Mix; area)" \
"STACK:warn2#FFFF00:in Warning (Mix)" \
"STACK:crit2#FF0000:in Critical (Mix)" \
"LINE3:ok1#0000FF:in OK (CPunk; line)" \
"STACK:warn1#00FFFF:in Warning (CPunk)" \
"STACK:crit1#FF00FF:in Critical (CPunk)" >/dev/null
|