]> git.openstreetmap.org Git - nominatim.git/blobdiff - munin/nominatim_requests
Merge pull request #3363 from mtmail/docs-link-correction
[nominatim.git] / munin / nominatim_requests
index 4e149859779d8c710b1ed011d8224f018a2c0c80..8a6d044ccd91ce104d5b08ad371a206f6ebe29ee 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/sh
 #
-# Plugin to monitor the types of requsts made to the API
+# Plugin to monitor the types of requests 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: 
 #
@@ -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"