mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-25 22:12:45 +03:00
Basic status page for monitoring nominatim is working
This commit is contained in:
parent
1d836f6c5c
commit
fca2d00617
@ -28,6 +28,7 @@
|
|||||||
@define('CONST_ConnectionBucket_Cost_Reverse', 1);
|
@define('CONST_ConnectionBucket_Cost_Reverse', 1);
|
||||||
@define('CONST_ConnectionBucket_Cost_Search', 2);
|
@define('CONST_ConnectionBucket_Cost_Search', 2);
|
||||||
@define('CONST_ConnectionBucket_Cost_Details', 3);
|
@define('CONST_ConnectionBucket_Cost_Details', 3);
|
||||||
|
@define('CONST_ConnectionBucket_Cost_Status', 1);
|
||||||
|
|
||||||
// Override this function to add an adjustment factor to the cost
|
// Override this function to add an adjustment factor to the cost
|
||||||
// based on server load. e.g. getBlockingProcesses
|
// based on server load. e.g. getBlockingProcesses
|
||||||
|
@ -619,6 +619,7 @@
|
|||||||
@symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php');
|
@symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php');
|
||||||
@symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php');
|
@symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php');
|
||||||
@symlink(CONST_BasePath.'/website/polygons.php', $sTargetDir.'/polygons.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/images', $sTargetDir.'/images');
|
||||||
@symlink(CONST_BasePath.'/website/js', $sTargetDir.'/js');
|
@symlink(CONST_BasePath.'/website/js', $sTargetDir.'/js');
|
||||||
@symlink(CONST_BasePath.'/website/css', $sTargetDir.'/css');
|
@symlink(CONST_BasePath.'/website/css', $sTargetDir.'/css');
|
||||||
|
26
website/status.php
Normal file
26
website/status.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
@define('CONST_ConnectionBucket_PageType', 'Status');
|
||||||
|
|
||||||
|
require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
|
||||||
|
|
||||||
|
$oDB =& getDB();
|
||||||
|
if (!$oDB || PEAR::isError($oDB))
|
||||||
|
{
|
||||||
|
echo "ERROR: No database";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$iWordID = $oDB->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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user