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(-) (limited to 'config/tinydns/tinydns_status.php') 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 From 075315233f0de50dae533e0606a6313c2cab32aa Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 18 Nov 2013 22:01:59 +0100 Subject: Make tinydns failover IPv6 comaptible --- config/tinydns/tinydns_status.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config/tinydns/tinydns_status.php') diff --git a/config/tinydns/tinydns_status.php b/config/tinydns/tinydns_status.php index e573b693..25159785 100644 --- a/config/tinydns/tinydns_status.php +++ b/config/tinydns/tinydns_status.php @@ -30,6 +30,7 @@ */ require("guiconfig.inc"); +require("/usr/local/pkg/tinydns.inc"); /* Defaults to this page but if no settings are present, redirect to setup page */ if(!$config['installedpackages']['tinydnsdomains']['config']) @@ -105,7 +106,8 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { $status = file_get_contents("/var/db/pingstatus/$monitorip"); else $status = "N/A"; - if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}") || stristr($tinydns_data, "={$hostname}:{$ipaddress}")) + $ip6 = tinydns_get_ip6_format($ipaddress); + if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}") || stristr($tinydns_data, "={$hostname}:{$ipaddress}") || stristr($tinydns_data, ":{$hostname}:28:{$ip6}")) $inservice = "YES"; else $inservice = "NO"; @@ -158,7 +160,8 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) { echo $ipaddress; if($row['loadbalance']) echo " (LB)"; - if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}") || stristr($tinydns_data, "={$hostname}:{$row['failoverip']}")) + $ip6 = tinydns_get_ip6_format($row['failoverip']); + if(stristr($tinydns_data, "+{$hostname}:{$row['failoverip']}") || stristr($tinydns_data, "={$hostname}:{$row['failoverip']}") || stristr($tinydns_data, ":{$hostname}:28:{$ip6}")) $inservice = "YES"; else $inservice = "NO"; -- cgit v1.2.3 From 726f41eeb0f7198372da9db4988d6561ff03a7fd Mon Sep 17 00:00:00 2001 From: Jeremy Brown Date: Thu, 21 Aug 2014 09:55:13 -0700 Subject: Change require to not specify full path since its already in the include_path --- config/tinydns/tinydns_status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/tinydns/tinydns_status.php') diff --git a/config/tinydns/tinydns_status.php b/config/tinydns/tinydns_status.php index 25159785..afc37f1c 100644 --- a/config/tinydns/tinydns_status.php +++ b/config/tinydns/tinydns_status.php @@ -30,7 +30,7 @@ */ require("guiconfig.inc"); -require("/usr/local/pkg/tinydns.inc"); +require("tinydns.inc"); /* Defaults to this page but if no settings are present, redirect to setup page */ if(!$config['installedpackages']['tinydnsdomains']['config']) -- 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 "