Commit graph

153 commits

Author SHA1 Message Date
Luca Deri
fcd8b0bedc Implements #3517 2020-03-08 11:55:41 +01:00
emanuele-f
b4dbb88492 Fix invalid source_id_last_zmq_remote_stats map item delete
Also fixes:
 - Missing source_id_last_zmq_remote_stats cleanup on shutdown
 - Leak in Ntop::registerInterface when maximum interfaces number is reached
 - Concurrent access to Ntop::registerInterface from registerSubInterface

Fixes #3495
2020-03-03 13:00:54 +01:00
Simone Mainardi
55cdb6c5ea Reworks slow rrd calc for periodic activites 2020-02-25 13:30:10 +01:00
Simone Mainardi
1cd375d756 Implements per-activity rrd writes duration 2020-02-19 15:34:29 +01:00
Simone Mainardi
0e64fd94d6 Implements deadlines for periodic and user scripts 2020-02-18 18:44:41 +01:00
emanuele-f
4c66c55103 Fix leaks in AlertsQueue when queue is full 2020-02-13 11:58:25 +01:00
Simone Mainardi
af295f7f20 Fixes local networks counting as broadcast domains 2020-02-03 17:38:34 +01:00
Alfredo Cardigliano
da6b521d53 Computing restricted filter for users allowed to capture live traffic based allowed subnets 2020-01-13 13:02:57 +01:00
Alfredo Cardigliano
a86aaa61e6 Add configuration of user permission for downloading pcap (hidden for the time being) 2020-01-10 18:16:01 +01:00
Luca Deri
57e6a93065 Improved scheduling algorithm to guarantee minimum service time when number of entries allow
Updated (C)
2020-01-06 23:36:36 +01:00
Simone Mainardi
adee07bcb4 Source changes to handle geoipupdate installed databases 2020-01-03 17:56:55 +01:00
emanuele-f
4621a8f409 Reload the periodic scripts when the configuration changes 2019-12-31 19:31:03 +01:00
Alfredo Cardigliano
2a3bef9d6c Replace JSON string with TLV for alerts generated by the datapath. This removes a JSON decode in housekeeping.lua (#3148) 2019-12-27 17:03:28 +01:00
emanuele-f
c74fa6e908 Implement reusable lua engine
The same Lua vm is now reused. After 5 minutes the vm is destroyed and
reloaded to prevent memory to grow too much. inotify is used to detected
changes in the filesystem (partially implemented, must implement a recursive
watch)

This optimizes periodic scripts calls by a 10x factor.
2019-12-24 18:35:58 +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
emanuele-f
fe9d5ee882 Fix plugins lua scripts runtime directory 2019-12-10 11:29:04 +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
Simone Mainardi
188ec66c25 Implements scriptable SNMP devices alerts 2019-11-22 18:00:31 +01:00
emanuele-f
c19bda5425 Move internal alerts queue from redis to C 2019-11-14 12:07:29 +01:00
emanuele-f
df0556cb87 Optimize flow alerts generation
This provides a ~10x speedup by performing the JSON serialization work in C
(and thus avoiding Lua->C overhead). This also implements two in-memory alerts
queues (one for sqlite and one for the notifications) in order to reduce Redis load.
Alerts queue are now global instead of per-interface as there is only 1 dequeing thread.
2019-11-14 11:54:13 +01:00
Luca
c396ca1d25 Implemented redis address resolution optimizations by means of a bloom filter
Extended redis statistics
2019-11-09 18:41:01 +01:00
Luca
5f72aa0c2e nDPI cleanup 2019-11-08 11:38:03 +00:00
Luca
f3d207a840 Disabled category cleanup 2019-11-07 06:55:02 +00:00
Luca
1fb32a0795 Unified nDPI struct across interfaces 2019-11-06 23:02:35 +00:00
Luca
0e523a4308 Changes to minimize the risk of categories reload 2019-11-06 09:17:53 +00:00
emanuele-f
01953cf76f Harden categories reload to avoid crashes if multiple housekeeping run concurrently 2019-11-04 12:01:27 +01:00
emanuele-f
378a1e2cd8 Optimize nDPI categories reload to avoid packet drops 2019-10-29 12:07:27 +01:00
Simone Mainardi
dc748b1b6d Implements stats for periodic scripts duration 2019-10-28 17:10:03 +01:00
Simone Mainardi
b3f50c6b21 Fixes DNS resolution leaks and wrong ping addresses 2019-09-23 14:54:19 +02:00
emanuele-f
74f761d18b Allow calls to alerts_api.trigger/alerts_api.release outside periodic scripts 2019-09-03 19:20:50 +02:00
emanuele-f
b66b71fd7e Implement alert on JA3 malicious signatures
Closes #2788
2019-08-28 18:33:13 +02:00
emanuele-f
6aa72b53f7 Implemement RTT monitoring configuration page 2019-06-11 17:30:46 +02:00
emanuele-f
791afdbaca Implement CPU load chart 2019-06-06 19:20:11 +02:00
emanuele-f
9da8f9fbea Network interface getters cleanup 2019-06-03 12:04:31 +02:00
Emanuele Faranda
5f9e8b17df
Implement System interface
The system interface now holds system wide alerts and timeseries
2019-06-03 08:53:26 +00:00
emanuele-f
a4ed782486 Add option to disable flow dump on a network interface
Closes #2576
2019-05-13 17:18:16 +02:00
Simone Mainardi
204ea6cf62 Cleanup unused code based on struct eBPFEvent 2019-05-13 14:47:47 +02:00
Simone Mainardi
6a8c57d042 Removes FlowChecker dependencies 2019-03-29 16:23:00 +01:00
Simone Mainardi
0023f7e247 Implements and shows ghost broadcast domains 2019-03-15 14:09:36 +01:00
Luca Deri
ea4619dd2f Reworked local broadcast domain implementation 2019-03-12 16:54:29 +01:00
Luca Deri
69a299486e Introuced eBPF support via libebpfflow https://github.com/ntop/libebpfflow 2019-03-01 16:52:09 +01:00
Emanuele Faranda
1bf7da7ef7 Implements Mac stats/data reset and reset at midnight (#2326)
* Host data/stats delete improvements

* Rework mac counters and implemtent mac stats/data reset

* Implement stats reset at midnight

* Add missing files
2019-01-21 17:27:12 +01:00
Simone Mainardi
831e5d91e6 Implements Lua unit tests 2019-01-18 18:03:36 +01:00
emanuele-f
5a88ee91da Rework flow exporters API
Now ElasticSearch and LogStash are bind to a NetworkInterface instance

Closes #2312
2019-01-15 12:53:21 +01:00
Simone Mainardi
d95d8541f3 Merge branch 'raphpen-dev' into dev 2019-01-09 12:26:43 +01:00
Simone Mainardi
e9811ae688 Implements X.509 client authentication 2019-01-09 12:21:56 +01:00
Luca Deri
bedff2c8e2 Updated (C) 2019-01-07 19:28:49 +01:00
Alfredo Cardigliano
3559fa6f81 Moved some initialization code from registerInterface to initInterface to fix #2290 (directories created by root instead of ntopng user) 2019-01-07 16:49:49 +01:00
emanuele-f
697eccf931 Add IPv6 support for login blacklist 2018-12-17 17:36:38 +01:00
emanuele-f
5e321077ca Disable user login after failed attempts 2018-12-17 17:36:38 +01:00