From fca2d0061780c5e7fb8b11a9fa2b618137b3cc8e Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Thu, 24 Jan 2013 12:42:34 +0000 Subject: [PATCH] Basic status page for monitoring nominatim is working --- settings/settings.php | 1 + utils/setup.php | 1 + website/status.php | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 website/status.php diff --git a/settings/settings.php b/settings/settings.php index 26b48551..fc3166b4 100644 --- a/settings/settings.php +++ b/settings/settings.php @@ -28,6 +28,7 @@ @define('CONST_ConnectionBucket_Cost_Reverse', 1); @define('CONST_ConnectionBucket_Cost_Search', 2); @define('CONST_ConnectionBucket_Cost_Details', 3); + @define('CONST_ConnectionBucket_Cost_Status', 1); // Override this function to add an adjustment factor to the cost // based on server load. e.g. getBlockingProcesses diff --git a/utils/setup.php b/utils/setup.php index 1ebee32f..e49a2d52 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -619,6 +619,7 @@ @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php'); @symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php'); @symlink(CONST_BasePath.'/website/polygons.php', $sTargetDir.'/polygons.php'); + @symlink(CONST_BasePath.'/website/status.php', $sTargetDir.'/status.php'); @symlink(CONST_BasePath.'/website/images', $sTargetDir.'/images'); @symlink(CONST_BasePath.'/website/js', $sTargetDir.'/js'); @symlink(CONST_BasePath.'/website/css', $sTargetDir.'/css'); diff --git a/website/status.php b/website/status.php new file mode 100644 index 00000000..0caa92a0 --- /dev/null +++ b/website/status.php @@ -0,0 +1,26 @@ +getOne("select word_id,word_token, word, class, type, location, country_code, operator, search_name_count from word where word_token in (' a')"); + if (PEAR::isError($iWordID)) + { + echo "ERROR: Query failed"; + exit; + } + if (!$iWordID) + { + echo "ERROR: No value"; + exit; + } + echo "OK"; + exit; +