From 93ef8a5824c20f8d942495081edc46853e82baf5 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 6 Mar 2015 10:41:20 -0500 Subject: Add option to disable alerts in ntopng (e.g. flooding messages) See https://forum.pfsense.org/index.php?topic=89911.0 --- config/ntopng/ntopng.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'config') 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 @@ ]]> ntopng - 1.1 v0.1 + 1.2 v0.4 Diagnostics: ntopng Settings Change pkg_edit.php?xml=ntopng.xml @@ -124,6 +124,12 @@ Enable historical data storage checkbox + + Disable Alerts + disable_alerts + Disables all alerts generated by ntopng, such as flooding notifications + checkbox + = 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, -- cgit v1.2.3