3 # Plugin to monitor the age of the imported data in the rendering db
8 # autoconf (optional - used by munin-config)
11 if [ "$1" = "config" ]; then
13 echo 'graph_title Data import lag'
14 echo 'graph_args --base 1000 -l 0'
15 echo 'graph_vlabel minutes'
16 echo 'graph_category nominatim'
17 echo 'age.label DB import age'
19 echo 'age.cdef age,60,/'
24 delay=`psql -d nominatim -c 'copy (select extract(epoch from timezone('utc', now())-lastimportdate)::int from import_status) to stdout'`
27 echo "age.value $delay"