X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/1edcd7208b6c95b360e763633042388c07814d39..5c43821ebe5de5892dcc4aa482d02c72e86bf637:/munin/nominatim_importlag diff --git a/munin/nominatim_importlag b/munin/nominatim_importlag new file mode 100755 index 00000000..8d69f3ce --- /dev/null +++ b/munin/nominatim_importlag @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Plugin to monitor the age of the imported data in the rendering db +# +# Parameters: +# +# config (required) +# autoconf (optional - used by munin-config) +# + +if [ "$1" = "config" ]; then + + echo 'graph_title Data import lag' + echo 'graph_args --base 1000 -l 0' + echo 'graph_vlabel minutes' + echo 'graph_category nominatim' + echo 'age.label DB import age' + echo 'age.type GAUGE' + echo 'age.cdef age,60,/' + exit 0 +fi + + +delay=`psql -d nominatim -c 'copy (select extract(epoch from now()-lastimportdate)::int from import_status) to stdout'` + + +echo "age.value $delay"