From cb8e0b1ce5f8ea0b35ebb1704856ed10416367ab Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 12 Nov 2013 18:15:50 +0100 Subject: Changed status page of tinydns to view correct monitor status Changed layout of status page to show all relevant data of failover dns info --- config/tinydns/tinydns_status.php | 42 ++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/config/tinydns/tinydns_status.php b/config/tinydns/tinydns_status.php index ba119da9..e573b693 100644 --- a/config/tinydns/tinydns_status.php +++ b/config/tinydns/tinydns_status.php @@ -79,10 +79,11 @@ if ($pf_version < 2.0) - - + + - + + YES"; else $inservice = "NO"; @@ -115,8 +116,10 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo ""; echo ""; + echo ""; echo ""; @@ -146,7 +158,7 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo $ipaddress; if($row['loadbalance']) echo " (LB)"; - if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}")) + if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}") || stristr($tinydns_data, "={$hostname}:{$row['failoverip']}")) $inservice = "YES"; else $inservice = "NO"; @@ -154,14 +166,26 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo ""; echo ""; + echo ""; echo ""; echo ""; } -- cgit v1.2.3
IPStatusIPStatus In ServiceResponse timeMonitor ipResponse time
"; if(stristr($status,"DOWN")) echo "DOWN"; - else + else if(stristr($status,"UP")) echo "UP"; + else + echo "N/A"; echo ""; @@ -130,7 +133,16 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); else $msstatus = "N/A"; - echo "" . $msstatus; + echo $monitorip; + echo ""; + if(!$monitorip) + $monitorip = $ipaddress; + if(file_exists("/var/db/pingmsstatus/$monitorip")) + $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); + else + $msstatus = "N/A"; + echo $msstatus; echo "
"; if(stristr($status,"DOWN")) echo "DOWN"; - else + else if(stristr($status,"UP")) echo "UP"; + else + echo "N/A"; + echo ""; echo $inservice; echo ""; + if(!$monitorip) + $monitorip = $ipaddress; + if(file_exists("/var/db/pingmsstatus/$monitorip")) + $msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip"); + else + $msstatus = "N/A"; + echo $monitorip; + echo ""; if(!$monitorip) $monitorip = $ipaddress; @@ -170,7 +194,7 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { else $msstatus = "N/A"; - echo "" . $msstatus; + echo $msstatus; echo "