mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-22 12:06:27 +03:00
munin graph for the import lag
This commit is contained in:
parent
1edcd7208b
commit
5c43821ebe
27
munin/nominatim_importlag
Executable file
27
munin/nominatim_importlag
Executable file
@ -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"
|
Loading…
Reference in New Issue
Block a user