aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/tinydns/tinydns_status.php42
1 files 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)
<td class="tabcont" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="55%" class="listhdrr">IP</td>
- <td width="15%" class="listhdrr">Status</td>
+ <td width="45%" class="listhdrr">IP</td>
+ <td width="10%" class="listhdrr">Status</td>
<td width="15%" class="listhdrr">In Service</td>
- <td width="25%" class="listhdrr">Response time</td>
+ <td width="15%" class="listhdrr">Monitor ip</td>
+ <td width="15%" class="listhdrr">Response time</td>
</tr>
<?php
@@ -104,7 +105,7 @@ 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}"))
+ if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}") || stristr($tinydns_data, "={$hostname}:{$ipaddress}"))
$inservice = "<FONT COLOR='GREEN'>YES</FONT>";
else
$inservice = "<FONT COLOR='BLUE'>NO</FONT>";
@@ -115,8 +116,10 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) {
echo "<td class=\"listlr\">";
if(stristr($status,"DOWN"))
echo "<FONT COLOR='red'>DOWN</FONT>";
- else
+ else if(stristr($status,"UP"))
echo "UP";
+ else
+ echo "N/A";
echo "</td>";
echo "<td class=\"listlr\">";
@@ -130,7 +133,16 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) {
$msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip");
else
$msstatus = "N/A";
- echo "<!-- " . $monitorip . " -->" . $msstatus;
+ echo $monitorip;
+ echo "</td>";
+ echo "<td class=\"listlr\">";
+ 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 "</td>";
echo "</tr>";
@@ -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 = "<FONT COLOR='GREEN'>YES</FONT>";
else
$inservice = "<FONT COLOR='BLUE'>NO</FONT>";
@@ -154,8 +166,11 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) {
echo "<td class=\"listlr\">";
if(stristr($status,"DOWN"))
echo "<FONT COLOR='red'>DOWN</FONT>";
- else
+ else if(stristr($status,"UP"))
echo "UP";
+ else
+ echo "N/A";
+
echo "</td>";
echo "<td class=\"listlr\">";
@@ -169,8 +184,17 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) {
$msstatus = file_get_contents("/var/db/pingmsstatus/$monitorip");
else
$msstatus = "N/A";
+ echo $monitorip;
+ echo "</td>";
+ echo "<td class=\"listlr\">";
+ 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 . " -->" . $msstatus;
+ echo $msstatus;
echo "</td>";
echo "</tr>";
}