From 630533c484ff6ffc735b70b064efc041100a2b9f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 9 Dec 2006 02:17:20 +0000 Subject: * Cleanup status * Import XMLRPC file --- packages/tinydns/tinydns_status.php | 28 +++++++- packages/tinydns/tinydns_xmlrpc_sync.php | 111 +++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 packages/tinydns/tinydns_xmlrpc_sync.php (limited to 'packages') diff --git a/packages/tinydns/tinydns_status.php b/packages/tinydns/tinydns_status.php index a35d6b5b..f8ddda61 100644 --- a/packages/tinydns/tinydns_status.php +++ b/packages/tinydns/tinydns_status.php @@ -63,21 +63,31 @@ include("head.inc"); IP Status + In Service Response time YES"; + else + $inservice = "NO"; echo ""; echo ""; - echo $ipaddress; + echo "$hostname
$ipaddress"; echo ""; echo ""; if(stristr($status,"DOWN")) @@ -85,6 +95,11 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { else echo $status; echo ""; + + echo ""; + echo $inservice; + echo ""; + echo ""; if(file_exists("/var/db/pingmsstatus/$ipaddress")) $msstatus = file_get_contents("/var/db/pingmsstatus/$ipaddress"); @@ -100,6 +115,12 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo ""; echo "    |->  "; echo $ipaddress; + if($row['loadbalance']) + echo " (LB)"; + if(stristr($tinydns_data ,$row['failoverip'])) + $inservice = "YES"; + else + $inservice = "NO"; echo ""; echo ""; if(stristr($status,"DOWN")) @@ -107,6 +128,11 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { else echo $status; echo ""; + + echo ""; + echo $inservice; + echo ""; + echo ""; if(file_exists("/var/db/pingmsstatus/$ipaddress")) $msstatus = file_get_contents("/var/db/pingmsstatus/$ipaddress"); diff --git a/packages/tinydns/tinydns_xmlrpc_sync.php b/packages/tinydns/tinydns_xmlrpc_sync.php new file mode 100644 index 00000000..6c6ef5a2 --- /dev/null +++ b/packages/tinydns/tinydns_xmlrpc_sync.php @@ -0,0 +1,111 @@ +setCredentials('admin', $password); + if($g['debug']) + $cli->setDebug(1); + /* send our XMLRPC message and timeout after 240 seconds */ + $resp = $cli->send($msg, "999"); + if(!$resp) { + $error = "A communications error occured while attempting tinydns XMLRPC sync with {$url}:{$port}."; + log_error($error); + file_notice("sync_settings", $error, "tinydns Settings Sync", ""); + } elseif($resp->faultCode()) { + $error = "An error code was received while attempting tinydns XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("sync_settings", $error, "tinydns Settings Sync", ""); + } else { + log_error("tinydns XMLRPC sync successfully completed with {$url}:{$port}."); + } + log_error("[tinydns] tinydns_xmlrpc_sync.php is ending."); +} + +?> \ No newline at end of file -- cgit v1.2.3