diff --git a/utils/munin/mod_tile_fresh b/utils/munin/mod_tile_fresh index e689bf54..469c341a 100755 --- a/utils/munin/mod_tile_fresh +++ b/utils/munin/mod_tile_fresh @@ -56,7 +56,7 @@ if [ "$1" = "config" ]; then exit 0 fi -data=$(wget -q http://localhost/mod_tile -O -) +data=$(wget -q ${MOD_TILE_URL:-http://localhost/mod_tile} -O -) fresh=$(expr match "$data" '.*NoFreshCache: \([0-9]*\)') freshRender=$(expr match "$data" '.*NoFreshRender: \([0-9]*\)') diff --git a/utils/munin/mod_tile_latency b/utils/munin/mod_tile_latency index 311b0e39..6f31b73f 100755 --- a/utils/munin/mod_tile_latency +++ b/utils/munin/mod_tile_latency @@ -62,7 +62,7 @@ fi #MUNIN_STATEFILE=latency.state -data=$(wget -q http://localhost/mod_tile -O -) +data=$(wget -q ${MOD_TILE_URL:-http://localhost/mod_tile} -O -) totalDuration=$(expr match "$data" '.*DurationTileBufferReads: \([0-9]*\)') noTotal=$(expr match "$data" '.*NoTileBufferReads: \([0-9]*\)') diff --git a/utils/munin/mod_tile_response b/utils/munin/mod_tile_response index 1f31bc60..afa2fc19 100755 --- a/utils/munin/mod_tile_response +++ b/utils/munin/mod_tile_response @@ -48,7 +48,7 @@ if [ "$1" = "config" ]; then exit 0 fi -data=$(wget -q http://localhost/mod_tile -O -) +data=$(wget -q ${MOD_TILE_URL:-http://localhost/mod_tile} -O -) ok_resp=$(expr match "$data" '.*NoResp200: \([0-9]*\)') nm_resp=$(expr match "$data" '.*NoResp304: \([0-9]*\)') diff --git a/utils/munin/mod_tile_zoom b/utils/munin/mod_tile_zoom index ac883476..f094b0a0 100755 --- a/utils/munin/mod_tile_zoom +++ b/utils/munin/mod_tile_zoom @@ -55,7 +55,7 @@ if [ "$1" = "config" ]; then exit 0 fi -data=$(wget -q http://localhost/mod_tile -O -) +data=$(wget -q ${MOD_TILE_URL:-http://localhost/mod_tile} -O -) resp_0=$(expr match "$data" '.*NoRespZoom00: \([0-9]*\)') resp_1=$(expr match "$data" '.*NoRespZoom01: \([0-9]*\)') diff --git a/utils/munin/renderd_processed b/utils/munin/renderd_processed index 78445fad..01560b14 100755 --- a/utils/munin/renderd_processed +++ b/utils/munin/renderd_processed @@ -63,12 +63,12 @@ if [ "$1" = "config" ]; then exit 0 fi -reqprocessed=$(sed -e '/^ReqRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqprioprocessed=$(sed -e '/^ReqPrioRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqpriolowprocessed=$(sed -e '/^ReqLowRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -dirtprocessed=$(sed -e '/^DirtyRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqbulkprocessed=$(sed -e '/^ReqBulkRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -dropped=$(sed -e '/^DropedRequest/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) +reqprocessed=$(sed -e '/^ReqRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqprioprocessed=$(sed -e '/^ReqPrioRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqpriolowprocessed=$(sed -e '/^ReqLowRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +dirtprocessed=$(sed -e '/^DirtyRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqbulkprocessed=$(sed -e '/^ReqBulkRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +dropped=$(sed -e '/^DropedRequest/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) echo "req.value " $reqprocessed echo "reqLow.value " $reqpriolowprocessed diff --git a/utils/munin/renderd_queue b/utils/munin/renderd_queue index 205be1c4..7de414c8 100755 --- a/utils/munin/renderd_queue +++ b/utils/munin/renderd_queue @@ -46,11 +46,11 @@ if [ "$1" = "config" ]; then exit 0 fi -reqlength=$(sed -e '/^ReqQueueLength/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqpriolength=$(sed -e '/^ReqPrioQueueLength/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqpriolowlength=$(sed -e '/^ReqLowQueueLength/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqbulklength=$(sed -e '/^ReqBulkQueueLength/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -dirtlength=$(sed -e '/^DirtQueueLength/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) +reqlength=$(sed -e '/^ReqQueueLength/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqpriolength=$(sed -e '/^ReqPrioQueueLength/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqpriolowlength=$(sed -e '/^ReqLowQueueLength/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqbulklength=$(sed -e '/^ReqBulkQueueLength/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +dirtlength=$(sed -e '/^DirtQueueLength/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) echo "reqPrio.value " $reqpriolength echo "req.value " $reqlength diff --git a/utils/munin/renderd_queue_time b/utils/munin/renderd_queue_time index 2de645d4..8a91aefd 100755 --- a/utils/munin/renderd_queue_time +++ b/utils/munin/renderd_queue_time @@ -61,11 +61,11 @@ if [ "$1" = "config" ]; then exit 0 fi -reqTime=$(sed -e '/^TimeRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqprioTime=$(sed -e '/^TimePrioRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqpriolowTime=$(sed -e '/^TimeLowRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -reqbulkTime=$(sed -e '/^TimeBulkRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -dirtyTime=$(sed -e '/^TimeDirtyRendered/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) +reqTime=$(sed -e '/^TimeRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqprioTime=$(sed -e '/^TimePrioRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqpriolowTime=$(sed -e '/^TimeLowRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +reqbulkTime=$(sed -e '/^TimeBulkRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +dirtyTime=$(sed -e '/^TimeDirtyRendered/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) echo "req.value " $reqTime echo "reqLow.value " $reqpriolowTime diff --git a/utils/munin/renderd_zoom b/utils/munin/renderd_zoom index 6fa6fd46..c7f2e972 100755 --- a/utils/munin/renderd_zoom +++ b/utils/munin/renderd_zoom @@ -63,27 +63,27 @@ if [ "$1" = "config" ]; then exit 0 fi -req0=$(sed -e '/^ZoomRendered00/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req1=$(sed -e '/^ZoomRendered01/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req2=$(sed -e '/^ZoomRendered02/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req3=$(sed -e '/^ZoomRendered03/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req4=$(sed -e '/^ZoomRendered04/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req5=$(sed -e '/^ZoomRendered05/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req6=$(sed -e '/^ZoomRendered06/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req7=$(sed -e '/^ZoomRendered07/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req8=$(sed -e '/^ZoomRendered08/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req9=$(sed -e '/^ZoomRendered09/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req10=$(sed -e '/^ZoomRendered10/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req11=$(sed -e '/^ZoomRendered11/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req12=$(sed -e '/^ZoomRendered12/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req13=$(sed -e '/^ZoomRendered13/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req14=$(sed -e '/^ZoomRendered14/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req15=$(sed -e '/^ZoomRendered15/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req16=$(sed -e '/^ZoomRendered16/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req17=$(sed -e '/^ZoomRendered17/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req18=$(sed -e '/^ZoomRendered18/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req19=$(sed -e '/^ZoomRendered19/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req20=$(sed -e '/^ZoomRendered20/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) +req0=$(sed -e '/^ZoomRendered00/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req1=$(sed -e '/^ZoomRendered01/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req2=$(sed -e '/^ZoomRendered02/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req3=$(sed -e '/^ZoomRendered03/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req4=$(sed -e '/^ZoomRendered04/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req5=$(sed -e '/^ZoomRendered05/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req6=$(sed -e '/^ZoomRendered06/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req7=$(sed -e '/^ZoomRendered07/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req8=$(sed -e '/^ZoomRendered08/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req9=$(sed -e '/^ZoomRendered09/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req10=$(sed -e '/^ZoomRendered10/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req11=$(sed -e '/^ZoomRendered11/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req12=$(sed -e '/^ZoomRendered12/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req13=$(sed -e '/^ZoomRendered13/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req14=$(sed -e '/^ZoomRendered14/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req15=$(sed -e '/^ZoomRendered15/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req16=$(sed -e '/^ZoomRendered16/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req17=$(sed -e '/^ZoomRendered17/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req18=$(sed -e '/^ZoomRendered18/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req19=$(sed -e '/^ZoomRendered19/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req20=$(sed -e '/^ZoomRendered20/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) if [ -z req19 ]; then req19=0; fi if [ -z req20 ]; then req20=0; fi diff --git a/utils/munin/renderd_zoom_time b/utils/munin/renderd_zoom_time index 3f5f53ec..cd658239 100755 --- a/utils/munin/renderd_zoom_time +++ b/utils/munin/renderd_zoom_time @@ -69,27 +69,27 @@ if [ "$1" = "config" ]; then exit 0 fi -req0=$(sed -e '/^TimeRenderedZoom00/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req1=$(sed -e '/^TimeRenderedZoom01/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req2=$(sed -e '/^TimeRenderedZoom02/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req3=$(sed -e '/^TimeRenderedZoom03/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req4=$(sed -e '/^TimeRenderedZoom04/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req5=$(sed -e '/^TimeRenderedZoom05/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req6=$(sed -e '/^TimeRenderedZoom06/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req7=$(sed -e '/^TimeRenderedZoom07/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req8=$(sed -e '/^TimeRenderedZoom08/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req9=$(sed -e '/^TimeRenderedZoom09/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req10=$(sed -e '/^TimeRenderedZoom10/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req11=$(sed -e '/^TimeRenderedZoom11/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req12=$(sed -e '/^TimeRenderedZoom12/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req13=$(sed -e '/^TimeRenderedZoom13/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req14=$(sed -e '/^TimeRenderedZoom14/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req15=$(sed -e '/^TimeRenderedZoom15/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req16=$(sed -e '/^TimeRenderedZoom16/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req17=$(sed -e '/^TimeRenderedZoom17/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req18=$(sed -e '/^TimeRenderedZoom18/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req19=$(sed -e '/^TimeRenderedZoom19/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) -req20=$(sed -e '/^TimeRenderedZoom20/!d' -e 's/.*: //' -e q /run/renderd/renderd.stats) +req0=$(sed -e '/^TimeRenderedZoom00/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req1=$(sed -e '/^TimeRenderedZoom01/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req2=$(sed -e '/^TimeRenderedZoom02/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req3=$(sed -e '/^TimeRenderedZoom03/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req4=$(sed -e '/^TimeRenderedZoom04/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req5=$(sed -e '/^TimeRenderedZoom05/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req6=$(sed -e '/^TimeRenderedZoom06/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req7=$(sed -e '/^TimeRenderedZoom07/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req8=$(sed -e '/^TimeRenderedZoom08/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req9=$(sed -e '/^TimeRenderedZoom09/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req10=$(sed -e '/^TimeRenderedZoom10/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req11=$(sed -e '/^TimeRenderedZoom11/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req12=$(sed -e '/^TimeRenderedZoom12/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req13=$(sed -e '/^TimeRenderedZoom13/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req14=$(sed -e '/^TimeRenderedZoom14/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req15=$(sed -e '/^TimeRenderedZoom15/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req16=$(sed -e '/^TimeRenderedZoom16/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req17=$(sed -e '/^TimeRenderedZoom17/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req18=$(sed -e '/^TimeRenderedZoom18/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req19=$(sed -e '/^TimeRenderedZoom19/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) +req20=$(sed -e '/^TimeRenderedZoom20/!d' -e 's/.*: //' -e q ${RENDERD_STATS:-/run/renderd/renderd.stats}) if [ -z "$req19" ]; then req19=0; fi if [ -z "$req20" ]; then req20=0; fi diff --git a/utils/munin/replication_delay b/utils/munin/replication_delay index 20eb00b5..895709f8 100755 --- a/utils/munin/replication_delay +++ b/utils/munin/replication_delay @@ -34,7 +34,7 @@ if [ "$1" = "config" ]; then exit 0 fi -tstamp=$(sed -e '/^timestamp=/!d' -e 's/.*=//' -e 's/Z//' -e 's/T/Z/' -e 's/\\\\//' -e 's/\\\\//' -e q /home/osm/replicate/state.txt) +tstamp=$(sed -e '/^timestamp=/!d' -e 's/.*=//' -e 's/Z//' -e 's/T/Z/' -e 's/\\\\//' -e 's/\\\\//' -e q ${REPLICATION_STATE:-/home/osm/replicate/state.txt}) tstampsec=$(date --date=$tstamp +%s) nowsec=$(date +%s)