+#!/usr/bin/env bash
+#
+# DO NOT EDIT - This file is being maintained by Chef
+#
+# Based on: https://github.com/drolbr/Overpass-API/blob/way_based_areas/munin/osm_db_request_count
+
+if [[ "$1" = "config" ]]; then
+{
+ echo 'graph_title API request count'
+ echo 'graph_vlabel per minute'
+ echo 'graph_category overpass'
+ echo "overpass_request_started.label started"
+ echo "overpass_request_started.type COUNTER"
+ echo "overpass_request_started.cdef overpass_request_started,60,*"
+ echo "overpass_request_started.max 10000"
+ echo "overpass_request_completed.label completed"
+ echo "overpass_request_completed.type COUNTER"
+ echo "overpass_request_completed.cdef overpass_request_completed,60,*"
+ echo "overpass_request_completed.max 10000"
+ echo "overpass_area_request_started.label started"
+ echo "overpass_area_request_started.type COUNTER"
+ echo "overpass_area_request_started.cdef overpass_request_started,60,*"
+ echo "overpass_area_request_started.max 10000"
+ echo "overpass_area_request_completed.label completed"
+ echo "overpass_area_request_completed.type COUNTER"
+ echo "overpass_area_request_completed.cdef overpass_request_completed,60,*"
+ echo "overpass_area_request_completed.max 10000"
+ exit 0
+}; fi
+
+BASE_STATUS=`<%= @basedir %>/bin/dispatcher --osm-base --status | tr '\n' '|'`
+AREA_STATUS=`<%= @basedir %>/bin/dispatcher --areas --status | tr '\n' '|'`
+
+STARTED=`echo $BASE_STATUS | sed 's,.*Counter of started requests:,,;s:|.*::'`
+echo "overpass_request_started.value $STARTED"
+
+COMPLETED=`echo $BASE_STATUS | sed 's,.*Counter of finished requests:,,;s:|.*::'`
+echo "overpass_request_completed.value $COMPLETED"
+
+STARTED=`echo $AREA_STATUS | sed 's,.*Counter of started requests:,,;s:|.*::'`
+echo "overpass_area_request_started.value $STARTED"
+
+COMPLETED=`echo $AREA_STATUS | sed 's,.*Counter of finished requests:,,;s:|.*::'`
+echo "overpass_area_request_completed.value $COMPLETED"