2 echo "Content-type: image/png"
8 Z=$(rrdtool fetch $1 AVERAGE -s-5min -r900 | grep : | grep -v nan | tail -1 | cut -d ' ' -f 2)
16 exec rrdtool graph - \
19 --title "Temperature" \
21 -x MINUTE:10:HOUR:1:HOUR:2:0:%H:%M \
23 --right-axis 1:0 --right-axis-format "%3.0lf" \
24 --units-exponent 0 --lower-limit -20 --upper-limit 40 --rigid \
25 --legend-position east \
27 DEF:g=$D/sensor-garage.rrd:temp:AVERAGE \
28 DEF:u=$D/sensor-ursarium.rrd:temp:AVERAGE \
29 DEF:c=$D/sensor-catarium.rrd:temp:AVERAGE \
30 DEF:m=$D/sensor-machinarium.rrd:temp:AVERAGE \
31 DEF:a=$D/sensor-aquarium.rrd:temp:AVERAGE \
36 'LINE2:g#cc0000:Garage\n' \
37 'LINE2:u#0000cc:Ursarium\n' \
38 'LINE2:a#00cccc:Aquarium\n' \
39 'LINE2:c#cc00cc:Catarium\n' \
40 'LINE2:m#00cc00:Machinarium\n' \
45 'COMMENT:<span foreground="#cc0000" font-size="x-large" weight="bold">'"$(current $D/sensor-garage.rrd)"'</span>\l' \
47 'COMMENT:<span foreground="#0000cc" font-size="x-large" weight="bold">'"$(current $D/sensor-ursarium.rrd)"'</span>\l' \
49 'COMMENT:<span foreground="#00cccc" font-size="x-large" weight="bold">'"$(current $D/sensor-aquarium.rrd)"'</span>\l' \
51 'COMMENT:<span foreground="#cc00cc" font-size="x-large" weight="bold">'"$(current $D/sensor-catarium.rrd)"'</span>\l' \
53 'COMMENT:<span foreground="#00cc00" font-size="x-large" weight="bold">'"$(current $D/sensor-machinarium.rrd)"'</span>\l' \