3 # DO NOT EDIT - This file is being maintained by Chef
5 # Based on: https://github.com/drolbr/Overpass-API/blob/way_based_areas/munin/osm_replication_lag-api
7 if [ "$1" = "config" ]; then
9 echo 'graph_title DB Lag'
10 echo 'graph_args --base 1000'
11 echo 'graph_vlabel minutes behind main database'
12 echo 'graph_category overpass'
14 echo 'lag.label replication lag'
16 echo 'lag.cdef lag,60,/'
17 echo 'lag.critical 1000'
22 lag=$(($(date +%s)-$(date +%s --utc -d "$(cat <%= @basedir %>/db/osm_base_version | cut -f2 -d\" | sed s/"\\\\"/""/g | sed s/[ZT]/" "/g)" )))