aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ntopng/ntopng.xml240
-rw-r--r--config/tinydns/tinydns.inc73
-rw-r--r--config/tinydns/tinydns_domains.xml22
-rw-r--r--config/tinydns/tinydns_status.php45
-rw-r--r--config/tinydns/tinydns_view_logs.php7
-rw-r--r--config/zabbix2/zabbix2-agent.xml4
-rw-r--r--config/zabbix2/zabbix2-proxy.xml4
-rw-r--r--config/zabbix2/zabbix2.inc2
8 files changed, 358 insertions, 39 deletions
diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml
new file mode 100644
index 00000000..5428d205
--- /dev/null
+++ b/config/ntopng/ntopng.xml
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<packagegui>
+ <copyright>
+ <![CDATA[
+/* $Id$ */
+/* ========================================================================== */
+/*
+ ntopng.xml
+ part of pfSense (http://www.pfSense.com)
+ Copyright (C) 2014 ESF, LLC
+ All rights reserved.
+*/
+/* ========================================================================== */
+/*
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+/* ========================================================================== */
+ ]]>
+ </copyright>
+ <name>ntopng</name>
+ <version>1.1 v0.1</version>
+ <title>Diagnostics: ntopng Settings</title>
+ <savetext>Change</savetext>
+ <aftersaveredirect>pkg_edit.php?xml=ntopng.xml</aftersaveredirect>
+ <menu>
+ <name>ntopng Settings</name>
+ <tooltiptext>Set ntopng settings such as password and port.</tooltiptext>
+ <section>Diagnostics</section>
+ <url>/pkg_edit.php?xml=ntopng.xml&amp;id=0</url>
+ </menu>
+ <menu>
+ <name>ntopng</name>
+ <tooltiptext>Access ntopng</tooltiptext>
+ <section>Diagnostics</section>
+ <url>http://$myurl:3000</url>
+ <depends_on_service>ntopng</depends_on_service>
+ </menu>
+ <service>
+ <name>ntopng</name>
+ <rcfile>ntopng.sh</rcfile>
+ <executable>ntopng</executable>
+ <description>ntopng bandwidth monitoring/graphing</description>
+ </service>
+ <tabs>
+ <tab>
+ <text>ntopng Settings</text>
+ <url>/pkg_edit.php?xml=ntopng.xml&amp;id=0</url>
+ <active/>
+ </tab>
+ <tab>
+ <text>Access ntopng</text>
+ <url>http://$myurl:3000</url>
+ </tab>
+ </tabs>
+ <fields>
+ <field>
+ <fielddescr>ntopng Admin Password</fielddescr>
+ <fieldname>password</fieldname>
+ <description>Enter the password for the ntopng GUI. Minimum 5 characters, defaults to admin.</description>
+ <type>password</type>
+ </field>
+ <field>
+ <fielddescr>Confirm ntopng Admin Password</fielddescr>
+ <fieldname>passwordagain</fieldname>
+ <type>password</type>
+ </field>
+ <field>
+ <fielddescr>Interface</fielddescr>
+ <fieldname>interface_array</fieldname>
+ <type>interfaces_selection</type>
+ <size>3</size>
+ <value>lan</value>
+ <multiple>true</multiple>
+ </field>
+ <field>
+ <fielddescr>DNS Mode</fielddescr>
+ <fieldname>dns_mode</fieldname>
+ <description>Configures how name resolution is handled</description>
+ <type>select</type>
+ <default_value>0</default_value>
+ <options>
+ <option><value>0</value><name>Decode DNS responses and resolve local numeric IPs only (default)</name></option>
+ <option><value>1</value><name>Decode DNS responses and resolve all numeric IPs</name></option>
+ <option><value>2</value><name>Decode DNS responses and don't resolve numeric IPs</name></option>
+ <option><value>3</value><name>Don't decode DNS responses and don't resolve numeric IPs</name></option>
+ </options>
+ </field>
+ <field>
+ <fielddescr>Local Networks</fielddescr>
+ <fieldname>local_networks</fieldname>
+ <description>Configures how Local Networks are defined</description>
+ <type>select</type>
+ <default_value>rfc1918</default_value>
+ <options>
+ <option><value>rfc1918</value><name>Consider all RFC1918 networks local</name></option>
+ <option><value>selected</value><name>Consider selected interface networks local</name></option>
+ <option><value>lanonly</value><name>Consider only LAN interface local</name></option>
+ </options>
+ </field>
+ </fields>
+ <custom_php_global_functions>
+ <![CDATA[
+ function sync_package_ntopng() {
+ conf_mount_rw();
+ config_lock();
+ global $config;
+ global $input_errors;
+ if ($_POST) {
+ $config['installedpackages']['ntopng']['config'] = array();
+ $config['installedpackages']['ntopng']['config'][0] = $_POST;
+ }
+ $ntopng_config =& $config['installedpackages']['ntopng']['config'][0];
+ $if_final = "";
+ $ifaces_final = "";
+ system("/bin/mkdir -p /var/db/ntopng");
+ system("/bin/mkdir -p /var/db/ntopng/rrd");
+ system("/bin/mkdir -p /var/db/ntopng/rrd/graphics");
+ system("/bin/chmod -R 755 /var/db/ntopng");
+ system("/usr/sbin/chown -R nobody:nobody /var/db/ntopng");
+ system("/bin/cp -Rp /usr/local/lib/X11/fonts/webfonts/ /usr/local/lib/X11/fonts/TTF/");
+ $first = 0;
+ foreach($ntopng_config['interface_array'] as $iface) {
+ $if = convert_friendly_interface_to_real_interface_name($iface);
+ if ($if) {
+ $ifaces .= " -i " . escapeshellarg("{$if}");
+ }
+ }
+
+ // DNS Mode
+ if (is_numeric($ntopng_config['dns_mode']) && ($ntopng_config['dns_mode'] >= 0) && ($ntopng_config['dns_mode'] <= 3)) {
+ $dns_mode = "--dns-mode " . escapeshellarg($ntopng_config['dns_mode']);
+ }
+
+ // Local Networks >
+ switch ($ntopng_config['local_networks']) {
+ case "selected":
+ $nets = array();
+ foreach ($ntopng_config['interface_array'] as $iface) {
+ if (is_ipaddr(get_interface_ip($iface))) {
+ $nets[] = gen_subnet(get_interface_ip($iface),get_interface_subnet($iface)) . '/' . get_interface_subnet($iface);
+ }
+ }
+ if (!empty($nets))
+ $local_networks = "--local-networks " . escapeshellarg(implode(",", $nets));
+ break;
+ case "lanonly":
+ if (is_ipaddr(get_interface_ip('lan'))) {
+ $local_networks = "--local-networks " . escapeshellarg(gen_subnet(get_interface_ip('lan'),get_interface_subnet('lan')) . '/' . get_interface_subnet('lan'));
+ }
+ break;
+ case "rfc1918":
+ default:
+ $local_networks = "--local-networks '192.168.0.0/16,172.16.0.0/12,10.0.0.0/8'";
+ break;
+ }
+
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version >= 2.2) {
+ $redis_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/bin";
+ } else {
+ $redis_path = "/usr/pbi/ntopng-" . php_uname("m") . "/bin";
+ }
+
+ $start = "ldconfig -m /usr/pbi/ntopng-i386/lib\n";
+ $start .= "\t{$redis_path}/redis-server &\n";
+ // TODO:
+ // Add support for --data-dir /somewhere, --httpdocs-dir /somewhereelse,
+ // --dump-timeline (on/off) --http-port, --https-port
+
+ $start .= "\t/usr/local/bin/ntopng -s -e {$ifaces} {$dns_mode} {$aggregations} {$local_networks} &";
+ write_rcfile(array(
+ "file" => "ntopng.sh",
+ "start" => $start,
+ "stop" => "/usr/bin/killall ntopng redis-cli redis-server"
+ )
+ );
+ if (is_service_running("ntopng")) {
+ stop_service("ntopng");
+ // Wait for ntopng to shut down cleanly.
+ sleep(20);
+ }
+ start_service("ntopng");
+ sleep(2);
+
+ if (empty($ntopng_config['password']))
+ $ntopng_config['password'] = "admin";
+ $password = md5($ntopng_config['password']);
+ mwexec_bg("{$redis_path}/redis-cli SET user.admin.password " . escapeshellarg($password));
+ conf_mount_ro();
+ config_unlock();
+ }
+ ]]>
+ </custom_php_global_functions>
+ <custom_add_php_command>
+ sync_package_ntopng();
+ </custom_add_php_command>
+ <custom_php_resync_config_command>
+ sync_package_ntopng();
+ </custom_php_resync_config_command>
+ <custom_php_install_command>
+ <![CDATA[
+ mwexec_bg("/usr/pbi/ntopng-" . php_uname("m") . "/bin/geoipupdate.sh");
+ sync_package_ntopng();
+ ]]>
+ </custom_php_install_command>
+ <custom_php_deinstall_command>
+ exec("rm /usr/local/etc/rc.d/ntopng*");
+ </custom_php_deinstall_command>
+ <custom_php_validation_command>
+ <![CDATA[
+ if ($_POST) {
+ if (empty($_POST['password']) || empty($_POST['passwordagain']))
+ $input_errors[] = "You must provide (and confirm) ntopng's password.";
+ if ($_POST['password'] != $_POST['passwordagain'])
+ $input_errors[] = "The provided passwords did not match.";
+ }
+ ]]>
+ </custom_php_validation_command>
+</packagegui> \ No newline at end of file
diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc
index 70e149e1..8fb6170f 100644
--- a/config/tinydns/tinydns.inc
+++ b/config/tinydns/tinydns.inc
@@ -92,10 +92,11 @@ svscan_start () {
/usr/bin/env \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
/usr/sbin/daemon -f /bin/sh -c "\$command \$svscan_servicedir 2>&1 | /usr/local/bin/multilog t \$logdir" > /dev/null
+
EOD;
if ($enableipmonitoring) {
$svscan .= <<<EOD
- minicron {$refreshinterval} {$g['varrun_path']}/ping_hosts.pid "/etc/ping_hosts.sh; cd {$g['varetc_path']}/tinydns/root && /usr/local/bin/tinydns-data"
+ /usr/local/bin/minicron {$refreshinterval} {$g['varrun_path']}/ping_hosts.pid "/usr/local/bin/ping_hosts.sh"
EOD;
}
$svscan .= <<<EOD
@@ -105,6 +106,7 @@ $svscan .= <<<EOD
svscan_stop_post () {
echo "Stopping svscan."
find -L "\$svscan_servicedir" -mindepth 1 -maxdepth 2 -type d \( \! -path "\$svscan_servicedir/*/*" -or -name 'log' \) -print0 | xargs -0 /usr/local/bin/svc -dx
+ /bin/pkill -F /var/run/ping_hosts.pid
}
run_rc_command "\$1"
@@ -117,11 +119,12 @@ EOD;
$filename = "tinydns.sh";
$start = "/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDPHP
<?php
+ require_once(\"functions.inc\");
require_once(\"/usr/local/pkg/tinydns.inc\");
tinydns_custom_php_changeip_command();
tinydns_create_zone_file();\n";
if ($enableipmonitoring) {
- $start .= "tinydns_setup_ping_items();\n";
+ $start .= "tinydns_setup_ping_items();\n";
}
$start .= "?>
ENDPHP\n";
@@ -140,7 +143,6 @@ ENDPHP\n";
/bin/rm -rf {$g['varetc_path']}/dnscache* 2>/dev/null
/bin/rm -rf {$g['varetc_path']}/axfrdns 2>/dev/null
/bin/rm -rf {$g['varrun_path']}/axfrdns 2>/dev/null
- /bin/pkill -F /var/run/ping_hosts.pid
ENDSH;
@@ -359,16 +361,16 @@ function tinydns_get_record_status($record, $pingthreshold = "", $wanpingthresho
return "UP";
}
-function tinydns_get_backup_record($record) {
+function tinydns_get_backup_record($record, $recordtype) {
global $g, $config;
if($config['installedpackages']['tinydnsdomains']) {
foreach($config['installedpackages']['tinydnsdomains']['config'] as $domain) {
- if($domain['ipaddress'] == $record) {
- /* if no failover host exists, simply return original record */
+ if($domain['hostname'] == $record && $domain['recordtype'] == $recordtype) {
+ /* if no failover host exists, simply return original ipaddress */
if(!$domain['row'])
- return $record;
+ return $domain['ipaddress'];
foreach($domain['row'] as $row) {
- $status = tinydns_get_record_status($row['failoverip']);
+ $status = tinydns_get_record_status($row['monitorip']);
if($status == "UP")
return $row['failoverip'];
}
@@ -398,39 +400,60 @@ function tinydns_setup_ping_items() {
* status and create a database of the status information that we can use.
*/
foreach($config['installedpackages']['tinydnsdomains']['config'] as $domain) {
- if(!in_array($domain['ipaddress'], $processed)) {
- fwrite($fd, $ip . "|" . $domain['ipaddress'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php\n");
- $processed[] = $domain['ipaddress'];
- }
- if($domain['monitorip'] <> "")
- $monitorip = $domain['monitorip'];
+ if(!$domain['monitorip'])
+ continue;
+ if($domain['recordtype'] == "AAAA")
+ $inet = "inet6";
+ else
+ $inet = "";
+ $monitorip = $domain['monitorip'];
+ $interface = $domain['interface'];
if($domain['row']) {
foreach($domain['row'] as $row) {
if($row['pingthreshold'])
$pingthreshold = $row['pingthreshold'];
else
- $row['pingthreshold'] = "";
+ $pingthreshold = "";
+
+ if($row['wanpingthreshold'])
+ $wanpingthreshold = $row['wanpingthreshold'];
+ else
+ $wanpingthreshold = "";
+
+ $info = get_interface_info($row['interface']);
+ if($domain['recordtype'] == "AAAA")
+ $ip = $info['ipaddrv6'];
+ else
+ $ip = $info['ipaddr'];
+
if($row['monitorip']) {
if(!in_array($row['monitorip'], $processed)) {
- fwrite($fd, $ip . "|" . $row['monitorip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}\n");
+ fwrite($fd, $ip . "|" . $row['monitorip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}|{$wanpingthreshold}|{$inet}\n");
$processed[] = $row['monitorip'];
}
} else {
if(!in_array($monitorip, $processed)) {
- fwrite($fd, $ip . "|" . $monitorip . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}\n");
+ fwrite($fd, $ip . "|" . $monitorip . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}|{$wanpingthreshold}|{$inet}\n");
$processed[] = $monitorip;
}
}
}
}
+
+ $info = get_interface_info($domain['interface']);
+ if($domain['recordtype'] == "AAAA")
+ $ip = $info['ipaddrv6'];
+ else
+ $ip = $info['ipaddr'];
+
if($domain['monitorip']) {
if(!in_array($domain['monitorip'], $processed)) {
- fwrite($fd, $ip . "|" . $domain['monitorip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}\n");
+ fwrite($fd, $ip . "|" . $domain['monitorip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}|{$wanpingthreshold}|{$inet}\n");
$processed[] = $domain['monitorip'];
}
} else {
if(!in_array($row['failoverip'], $processed)) {
- fwrite($fd, $ip . "|" . $row['failoverip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}\n");
+ fwrite($fd, $ip . "|" . $row['failoverip'] . "|1|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}|{$wanpingthreshold}|{$inet}\n");
$processed[] = $row['failoverip'];
}
}
@@ -535,7 +558,9 @@ function tinydns_create_zone_file() {
for($x=0; $x< count($config['installedpackages']['tinydnsdomains']['config']); $x++) {
$domain = $config['installedpackages']['tinydnsdomains']['config'][$x];
$record_data = "";
+ $monitorip = "";
$hostname = $domain['hostname'];
+ $recordtype = $domain['recordtype'];
$ipaddress = $domain['ipaddress'];
$ttl = $domain['ttl'];
$dist = $domain['dist'];
@@ -549,9 +574,9 @@ function tinydns_create_zone_file() {
if($status == "DOWN") {
if($debug)
log_error("$ipaddress monitor ip $monitorip is offline.");
- $ipaddress = tinydns_get_backup_record($ipaddress);
+ $ipaddress = tinydns_get_backup_record($hostname, $recordtype);
if($debug)
- log_error("tinydns_get_backup_record returned $ipaddress ");
+ log_error("tinydns_get_backup_record for $hostname returned $ipaddress ");
}
}
$record_data = tinydns_get_rowline_data($ipaddress, $domain['recordtype'], $ttl, $hostname, $domain['rdns'], $dist, $domain['src_port'], $domain['src_weight'], $domain['src_priority'], $domain['src_timestamp']);
@@ -694,7 +719,8 @@ function tinydns_do_xmlrpc_sync($sync_to_ip, $password) {
/* tell tinydns to reload our settings on the destionation sync host. */
$method = 'pfsense.exec_php';
- $execcmd = "require_once('/usr/local/pkg/tinydns.inc');\n";
+ $execcmd = "require_once('functions.inc');\n";
+ $execcmd .= "require_once('/usr/local/pkg/tinydns.inc');\n";
$execcmd .= "tinydns_custom_php_changeip_command();\n";
$execcmd .= "tinydns_create_zone_file();\n";
if ($config['installedpackages']['tinydns']['config'][0]['enableipmonitoring']) {
@@ -1099,6 +1125,9 @@ function tinydns_get_dns_record_type($tinydnsrecord) {
case($tinydnsrecord[0] == "+"):
$rtype = "A";
break;
+ case($tinydnsrecord[0] == ":"):
+ $rtype = "AAAA";
+ break;
case($tinydnsrecord[0] == "@"):
$rtype = "MX";
break;
diff --git a/config/tinydns/tinydns_domains.xml b/config/tinydns/tinydns_domains.xml
index bf2194b3..52d287f5 100644
--- a/config/tinydns/tinydns_domains.xml
+++ b/config/tinydns/tinydns_domains.xml
@@ -83,6 +83,10 @@
<fieldname>recordtype</fieldname>
</columnitem>
<columnitem>
+ <fielddescr>Prio</fielddescr>
+ <fieldname>dist</fieldname>
+ </columnitem>
+ <columnitem>
<fielddescr>rDNS</fielddescr>
<fieldname>rdns</fieldname>
</columnitem>
@@ -94,6 +98,10 @@
<fielddescr>TTL</fielddescr>
<fieldname>ttl</fieldname>
</columnitem>
+ <columnitem>
+ <fielddescr>monitoring</fielddescr>
+ <fieldname>monitorip</fieldname>
+ </columnitem>
</adddeleteeditpagefields>
<fields>
<field>
@@ -250,6 +258,13 @@
<size>35</size>
</field>
<field>
+ <fielddescr>Interface</fielddescr>
+ <description>interface to ping via</description>
+ <fieldname>interface</fieldname>
+ <type>interfaces_selection</type>
+ <size>1</size>
+ </field>
+ <field>
<fielddescr>Failover hold time</fielddescr>
<description>Time in minutes before DNS switches to backup host</description>
<fieldname>threshhold</fieldname>
@@ -295,6 +310,13 @@
<type>input</type>
<size>15</size>
</rowhelperfield>
+ <rowhelperfield>
+ <fielddescr>interface</fielddescr>
+ <fieldname>interface</fieldname>
+ <description>interface to ping via</description>
+ <type>interfaces_selection</type>
+ <size>1</size>
+ </rowhelperfield>
</rowhelper>
</field>
</fields>
diff --git a/config/tinydns/tinydns_status.php b/config/tinydns/tinydns_status.php
index ba119da9..afc37f1c 100644
--- a/config/tinydns/tinydns_status.php
+++ b/config/tinydns/tinydns_status.php
@@ -30,6 +30,7 @@
*/
require("guiconfig.inc");
+require("tinydns.inc");
/* Defaults to this page but if no settings are present, redirect to setup page */
if(!$config['installedpackages']['tinydnsdomains']['config'])
@@ -79,10 +80,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 +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}"))
+ $ip6 = tinydns_get_ip6_format($ipaddress);
+ if(stristr($tinydns_data, "+{$hostname}:{$ipaddress}") || stristr($tinydns_data, "={$hostname}:{$ipaddress}") || stristr($tinydns_data, ":{$hostname}:28:{$ip6}"))
$inservice = "<FONT COLOR='GREEN'>YES</FONT>";
else
$inservice = "<FONT COLOR='BLUE'>NO</FONT>";
@@ -115,8 +118,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 +135,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 +160,8 @@ foreach($config['installedpackages']['tinydnsdomains']['config'] as $ping) {
echo $ipaddress;
if($row['loadbalance'])
echo " (LB)";
- if(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 = "<FONT COLOR='GREEN'>YES</FONT>";
else
$inservice = "<FONT COLOR='BLUE'>NO</FONT>";
@@ -154,8 +169,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 +187,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>";
}
diff --git a/config/tinydns/tinydns_view_logs.php b/config/tinydns/tinydns_view_logs.php
index 57daa02e..4b4f3c3f 100644
--- a/config/tinydns/tinydns_view_logs.php
+++ b/config/tinydns/tinydns_view_logs.php
@@ -32,7 +32,7 @@
require("guiconfig.inc");
if($_REQUEST['getactivity']) {
- $tinydnslogs = `cat /var/run/service/tinydns/log/main/current | /usr/local/bin/tai64nlocal | php -f /usr/local/pkg/tinydns_parse_logs.php | grep -v ":0"`;
+ $tinydnslogs = `cat /var/run/service/tinydns/log/main/current | /usr/local/bin/tai64nlocal | php -f /usr/local/pkg/tinydns_parse_logs.php | grep -v ":0 "`;
echo "TinyDNS Server logs as of " . date("D M j G:i:s T Y") . "\n\n";
echo $tinydnslogs;
exit;
@@ -53,8 +53,9 @@ include("head.inc");
/* NEED TO FIX */
if ($_POST['clear']) {
-// exec("rm /etc/tinydns/log/main/current");
-// exec("touch /etc/tinydns/log/main/current");
+ exec("rm /var/etc/tinydns/log/main/current");
+ exec("touch /var/etc/tinydns/log/main/current");
+ exec("chown Gdnslog /var/etc/tinydns/log/main/current");
}
?>
diff --git a/config/zabbix2/zabbix2-agent.xml b/config/zabbix2/zabbix2-agent.xml
index 57ef7be3..3d2400ad 100644
--- a/config/zabbix2/zabbix2-agent.xml
+++ b/config/zabbix2/zabbix2-agent.xml
@@ -6,7 +6,7 @@
/* ========================================================================== */
/*
zabbix2-agent.xml
- part of the Zebedee package for pfSense
+ part of the Zabbix package for pfSense
Copyright (C) 2013 Danilo G. Baio
Copyright (C) 2013 Marcello Coutinho
@@ -41,7 +41,7 @@
<name>zabbixagent</name>
<title>Services: Zabbix-2 Agent</title>
<category>Monitoring</category>
- <version>0.8.1</version>
+ <version>0.8.3</version>
<include_file>/usr/local/pkg/zabbix2.inc</include_file>
<addedit_string>Zabbix Agent has been created/modified.</addedit_string>
<delete_string>Zabbix Agent has been deleted.</delete_string>
diff --git a/config/zabbix2/zabbix2-proxy.xml b/config/zabbix2/zabbix2-proxy.xml
index b51d1d6b..00d9b106 100644
--- a/config/zabbix2/zabbix2-proxy.xml
+++ b/config/zabbix2/zabbix2-proxy.xml
@@ -6,7 +6,7 @@
/* ========================================================================== */
/*
zabbix2-proxy.xml
- part of the Zebedee package for pfSense
+ part of the Zabbix package for pfSense
Copyright (C) 2013 Danilo G. Baio
Copyright (C) 2013 Marcello Coutinho
@@ -41,7 +41,7 @@
<name>zabbixproxy</name>
<title>Services: Zabbix-2 Proxy</title>
<category>Monitoring</category>
- <version>0.8.1</version>
+ <version>0.8.3</version>
<include_file>/usr/local/pkg/zabbix2.inc</include_file>
<addedit_string>Zabbix Proxy has been created/modified.</addedit_string>
<delete_string>Zabbix Proxy has been deleted.</delete_string>
diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc
index c2ff4244..13713988 100644
--- a/config/zabbix2/zabbix2.inc
+++ b/config/zabbix2/zabbix2.inc
@@ -3,7 +3,7 @@
/* ========================================================================== */
/*
zabbix2-proxy.inc
- part of the Zebedee package for pfSense
+ part of the Zabbix package for pfSense
Copyright (C) 2013 Danilo G. Baio
Copyright (C) 2013 Marcello Coutinho