X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ad125a99132aabd53ead9229d980e1bd0a534927..42ec67f63c36eb6317ec72b3071437d33d0ce3d0:/munin/nominatim_requests diff --git a/munin/nominatim_requests b/munin/nominatim_requests index 4e149859..ac083fc2 100755 --- a/munin/nominatim_requests +++ b/munin/nominatim_requests @@ -2,6 +2,9 @@ # # Plugin to monitor the types of requsts made to the API # +# Can be configured through libpq environment variables, for example +# PGUSER, PGDATABASE, etc. See man page of psql for more information. +# # Parameters: # # config (required) @@ -32,10 +35,10 @@ fi query="select count(*)/5.0 from new_query_log where starttime > (now() - interval '5 min') and " -reverse=`psql -d nominatim -c "copy ($query type='reverse') to stdout"` -searchy=`psql -d nominatim -c "copy ($query type='search' and results>0) to stdout"` -searchn=`psql -d nominatim -c "copy ($query type='search' and results=0) to stdout"` -details=`psql -d nominatim -c "copy ($query type='details') to stdout"` +reverse=`psql -c "copy ($query type='reverse') to stdout"` +searchy=`psql -c "copy ($query type='search' and results>0) to stdout"` +searchn=`psql -c "copy ($query type='search' and results=0) to stdout"` +details=`psql -c "copy ($query type='details') to stdout"` echo "z1.value $reverse" echo "z2.value $searchy"