diff options
author | jim-p <jimp@pfsense.org> | 2015-03-06 10:41:20 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-03-06 10:41:20 -0500 |
commit | 93ef8a5824c20f8d942495081edc46853e82baf5 (patch) | |
tree | e33b33c48253d422735f21645204eea9853fed85 /config/ntopng | |
parent | 06dd4126ae57b5102b090f2d1d9f8e78e566adef (diff) | |
download | pfsense-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
Diffstat (limited to 'config/ntopng')
-rw-r--r-- | config/ntopng/ntopng.xml | 17 |
1 files changed, 14 insertions, 3 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, |