aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-03-06 10:41:20 -0500
committerjim-p <jimp@pfsense.org>2015-03-06 10:41:20 -0500
commit93ef8a5824c20f8d942495081edc46853e82baf5 (patch)
treee33b33c48253d422735f21645204eea9853fed85
parent06dd4126ae57b5102b090f2d1d9f8e78e566adef (diff)
downloadpfsense-packages-93ef8a5824c20f8d942495081edc46853e82baf5.tar.gz
pfsense-packages-93ef8a5824c20f8d942495081edc46853e82baf5.tar.bz2
pfsense-packages-93ef8a5824c20f8d942495081edc46853e82baf5.zip
Add option to disable alerts in ntopng (e.g. flooding messages)
See https://forum.pfsense.org/index.php?topic=89911.0
-rw-r--r--config/ntopng/ntopng.xml17
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 17 insertions, 6 deletions
diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml
index 1bbca76d..f287768b 100644
--- a/config/ntopng/ntopng.xml
+++ b/config/ntopng/ntopng.xml
@@ -39,7 +39,7 @@
]]>
</copyright>
<name>ntopng</name>
- <version>1.1 v0.1</version>
+ <version>1.2 v0.4</version>
<title>Diagnostics: ntopng Settings</title>
<savetext>Change</savetext>
<aftersaveredirect>pkg_edit.php?xml=ntopng.xml</aftersaveredirect>
@@ -124,6 +124,12 @@
<description>Enable historical data storage</description>
<type>checkbox</type>
</field>
+ <field>
+ <fielddescr>Disable Alerts</fielddescr>
+ <fieldname>disable_alerts</fieldname>
+ <description>Disables all alerts generated by ntopng, such as flooding notifications</description>
+ <type>checkbox</type>
+ </field>
</fields>
<custom_php_global_functions>
<![CDATA[
@@ -185,7 +191,12 @@
if ($ntopng_config['dump_flows'] >= on) {
$dump_flows = "-F";
}
-
+
+ // Disable alerts
+ if ($ntopng_config['disable_alerts'] >= on) {
+ $disable_alerts = "-H";
+ }
+
$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";
@@ -199,7 +210,7 @@
// Add support for --data-dir /somewhere, --httpdocs-dir /somewhereelse,
// --dump-timeline (on/off) --http-port, --https-port
- $start .= "\t/usr/local/bin/ntopng -d /var/db/ntopng -G /var/run/ntopng.pid -s -e {$dump_flows} {$ifaces} {$dns_mode} {$aggregations} {$local_networks} &";
+ $start .= "\t/usr/local/bin/ntopng -d /var/db/ntopng -G /var/run/ntopng.pid -s -e {$disable_alerts} {$dump_flows} {$ifaces} {$dns_mode} {$aggregations} {$local_networks} &";
write_rcfile(array(
"file" => "ntopng.sh",
"start" => $start,
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index ba8748c1..64b796d4 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -242,7 +242,7 @@
<ports_before>databases/redis databases/gdbm net/GeoIP x11-fonts/font-util x11-fonts/webfonts graphics/graphviz</ports_before>
<port>net/ntopng</port>
</build_pbi>
- <version>1.2.1 v0.3</version>
+ <version>1.2.1 v0.4</version>
<status>ALPHA</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/ntopng/ntopng.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index fffdd91d..1125255d 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -365,7 +365,7 @@
<ports_before>databases/redis databases/gdbm net/GeoIP x11-fonts/font-util x11-fonts/webfonts graphics/graphviz</ports_before>
<port>net/ntopng</port>
</build_pbi>
- <version>1.1 v0.3</version>
+ <version>1.1 v0.4</version>
<status>ALPHA</status>
<required_version>2.1.4</required_version>
<config_file>https://packages.pfsense.org/packages/config/ntopng/ntopng.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 4c24287d..aba2519b 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -352,7 +352,7 @@
<ports_before>databases/redis databases/gdbm net/GeoIP x11-fonts/font-util x11-fonts/webfonts graphics/graphviz</ports_before>
<port>net/ntopng</port>
</build_pbi>
- <version>1.1 v0.3</version>
+ <version>1.1 v0.4</version>
<status>ALPHA</status>
<required_version>2.1.4</required_version>
<config_file>https://packages.pfsense.org/packages/config/ntopng/ntopng.xml</config_file>