summaryrefslogtreecommitdiff
path: root/bin/remailer-states-make-image-long-2
blob: e655770fd0eecf6839a4af3f5e4939e8feb2af2c (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
31
#! /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-2.png \
	--start `date --date='24 month ago' +%s` \
	--title 'Number of Remailers/Mixmasters' \
	--vertical-label '#' \
	--lower-limit 0 \
	--height 150 \
	--width 640 \
        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