3 # Plugin to monitor the state / freshness of the tiles returned by mod_tile
8 # autoconf (optional - used by munin-config)
11 if [ "$1" = "config" ]; then
13 echo 'graph_title freshness of served tiles'
14 echo 'graph_args --base 1000 -l 0'
15 echo 'graph_vlabel tiles per ${graph_period}'
16 echo 'graph_category mod_tile'
17 echo 'fresh.label Fresh from disk'
18 echo 'fresh.draw AREA'
19 echo 'fresh.type DERIVE'
21 echo 'freshrender.label Freshly rendered'
22 echo 'freshrender.draw STACK'
23 echo 'freshrender.type DERIVE'
24 echo 'freshrender.min 0'
25 echo 'old.label Old from disk'
27 echo 'old.type DERIVE'
29 echo 'oldrender.label Old tile, attempted render'
30 echo 'oldrender.draw STACK'
31 echo 'oldrender.type DERIVE'
32 echo 'oldrender.min 0'
37 data=`wget -q http://localhost/mod_tile -O -`
39 fresh=`expr match "$data" '.*NoFreshCache: \([0-9]*\)'`
40 freshRender=`expr match "$data" '.*NoFreshRender: \([0-9]*\)'`
41 old=`expr match "$data" '.*NoOldCache: \([0-9]*\)'`
42 oldRender=`expr match "$data" '.*NoOldRender: \([0-9]*\)'`
44 echo "fresh.value " $fresh
45 echo "freshrender.value " $freshRender
46 echo "old.value " $old
47 echo "oldrender.value " $oldRender