Commit graph

229 commits

Author SHA1 Message Date
emanuele-f
c17ddb486e Ensure monotonic time in uSecDiffPeriodicActivityBody 2020-03-05 17:09:40 +01:00
emanuele-f
1c7dabf247 Pass current periodic activity time from C
This prevents possible inconsistencies between the C and lua time
2020-03-05 17:09:40 +01:00
emanuele-f
f9bd2973c8 Avoid cpu load timeseries creation on non linux platforms 2020-03-02 16:04:02 +01:00
Simone Mainardi
3405b7184e Writes new_flow timeseries every minute (not every second)
Implements #3456
2020-02-28 15:35:16 +01:00
Simone Mainardi
a1905609a2 Prevents writing ZMQ timeseries for non-ZMQ interfaces
Addresses #3456
2020-02-28 15:11:18 +01:00
Simone Mainardi
ec724babcf Unifies all internals timeseries in a single preference
Implements #3459
2020-02-28 15:00:51 +01:00
Simone Mainardi
474fe19e07 Writes CPU load every 5 secs (/proc/loadavg doesn't update faster)
Additional fix for #3465
2020-02-28 11:55:26 +01:00
Simone Mainardi
f6bd1b3493 Adds timeseries of iowait 2020-02-27 18:20:42 +01:00
Simone Mainardi
82a01c521a Computes CPU states every 5 seconds in the system interface 2020-02-27 16:48:08 +01:00
emanuele-f
b194643a18 Join exported and dropped flows into a single timeseries 2020-02-27 12:15:53 +01:00
emanuele-f
ea4f936d07 Join interface packets and drops into a single timeseries 2020-02-27 12:09:43 +01:00
emanuele-f
8abdb926cd Handle /proc/net/dev counters wrapping on 32bit platforms.
Fixes #3398
2020-02-25 16:56:58 +01:00
Simone Mainardi
bd46b7268e Implements system alerts for not executed activities 2020-02-21 14:00:06 +01:00
Simone Mainardi
a0612895fe Implements slow rrd checks and updates in C 2020-02-19 19:28:07 +01:00
Simone Mainardi
a7ea7f76ed Implements detection of slow timeseries append 2020-02-19 18:45:36 +01:00
emanuele-f
7c534a557c Add the is_critical_ts flag to force timeseries write 2020-02-19 15:31:36 +01:00
emanuele-f
d1140ec9fd Avoid timeseries read operations to display the chart icon
Now the icon is displayed whenever the timeseries are enabled for the given context
2020-02-19 13:27:20 +01:00
Simone Mainardi
0e64fd94d6 Implements deadlines for periodic and user scripts 2020-02-18 18:44:41 +01:00
Simone Mainardi
156975afd5 Show periodic scripts stats in the system interface 2020-02-17 15:43:42 +01:00
Simone Mainardi
95bd9ace07 Implements duration stats for system periodic activities 2020-02-17 14:39:58 +01:00
Simone Mainardi
00158e8bc2 Implements error handling in line protocol generation 2020-02-16 14:30:08 +01:00
emanuele-f
7e6909b561 Add now timestamp in SNMP 2020-02-11 17:33:19 +01:00
Simone Mainardi
7f6e69653e Fixes reload of scripts upon license changes or expiration
Fixes #3213
2020-01-27 14:07:50 +01:00
emanuele-f
242a9c8632 Fix SNMP scripts invoked also when disabled 2020-01-22 18:33:49 +01:00
emanuele-f
eafa80da09 Fixes for the 'all' hook 2020-01-22 16:54:33 +01:00
emanuele-f
aca088ea13 Add hyperlink to jump to the alert configuration
Closes #2936
2020-01-17 19:11:15 +01:00
Luca Deri
170bc60f19 Updated (C) 2020-01-08 23:52:51 +01:00
emanuele-f
d037f9a9a4 Use new user scripts config and gui
The user scripts configuration can now be configured from the "User Scripts" entry under the cog
icon. It allows the creation of multiple configuration presets to be applied to hosts, networks and
interfaces.
2020-01-03 13:03:34 +01:00
Simone Mainardi
b44de6e18d Implements discarded probing traffic counters and timeseries 2019-12-31 16:01:24 +01:00
Alfredo Cardigliano
8caed2a438 Comments 2019-12-27 15:22:59 +01:00
Simone Mainardi
c873aee41b Implement counter and chart for new flows per second 2019-12-27 12:29:55 +01:00
emanuele-f
c665bc78d7 Make configsets global 2019-12-23 13:25:35 +01:00
emanuele-f
c6c6c46132 Implement configsets target hosts CIDR match 2019-12-20 14:27:38 +01:00
emanuele-f
f62aa15117 Load new configsets while loading user scripts
Hosts/SNMP devices will be handled separately
2019-12-20 12:19:49 +01:00
emanuele-f
61ddcd9730 Fix syslog script subdir 2019-12-19 16:40:09 +01:00
emanuele-f
4c370de8cf Fix missing suricata user scripts 2019-12-19 16:36:51 +01:00
emanuele-f
139a16ffe3 Fix protocol categories association lost after reboot
After the recent changes, there is only one global nDPI struct which
is share across all the interfaces. However, the struct can be swapped
during normal operating, so it's necessary to reload the associations
every time a new nDPI struct is allocated.

Fixes #3139
2019-12-19 15:11:21 +01:00
Simone Mainardi
f9b6921983 Fixes devices policies reload and alerts generation
Fixes #3102
2019-12-19 11:42:24 +01:00
Simone Mainardi
692463fbc9 Fixes initial misdetection of flows with custom protocols 2019-12-19 10:38:51 +01:00
emanuele-f
b5197ba452 Integrate configsets with user scripts configurations 2019-12-16 17:36:30 +01:00
emanuele-f
c95473d659 Add snmpDevice hook and improve SNMP user scripts API
Closes #3097
2019-12-16 15:30:15 +01:00
emanuele-f
b10520e264 Rename checkAlerts callback to runScripts 2019-12-16 09:31:24 +01:00
emanuele-f
3a6897bb84 Community plugins fixes 2019-12-10 11:48:03 +01:00
emanuele-f
a3432e00e8 Implement ntopng plugins
Plugins are a convenient way to group together related lua scripts.
Their primary use case is to group user scripts and their alert/status
definition.
The builtin ntopng user scripts and definitions are now
packed into plugins directories. In future, we will support loading of
user created plugins.
Plugins are loaded at startup into some runtime directories and then
used. Other changes provided by this commit include:

- Add sample flow logger plugin
- Initial support for system user scripts
- Rename edge to threshold
- Migrate system probes to user scripts/plugins
- Migrate scripts to more explicit alerts_api.checkThresholdAlert api
2019-12-10 09:25:57 +01:00
emanuele-f
0d48bff069 Implement more flexible user_scripts api
NOTE: The existing alerts configuration of the users will be discarded.

Some code has been added to make the current gui on/off toggle work.
It is marked with the following comment:

-- TODO remove after implementing the new gui
2019-11-28 11:06:14 +01:00
Simone Mainardi
188ec66c25 Implements scriptable SNMP devices alerts 2019-11-22 18:00:31 +01:00
Simone Mainardi
4cde74af2b Allows system probes timeseries to be enabled/disabled
Fixes #3069
2019-11-20 16:05:14 +01:00
Simone Mainardi
68ce38d0ae Generalizes memory usage monitor with a system probe 2019-11-20 16:05:10 +01:00
Simone Mainardi
d3995e36a2 Fixes accesses to possibly nil discovered data 2019-11-19 18:12:56 +01:00
Alfredo Cardigliano
d2b7cea9c8 Keeping track of resident memory only (fix #3040) 2019-11-15 09:42:08 +01:00