Commit graph

395 commits

Author SHA1 Message Date
Alfredo Cardigliano
cfa3c0d1b4 Geolocation support instructions in the AS and countries pages 2020-01-07 17:32:26 +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
a2afb0a3f5 Implements lua flow status isTCPConnecting 2020-01-03 12:59:11 +01:00
Simone Mainardi
1b73a89dae Fixes detection of TCP connection-refused flow status 2020-01-03 12:37:41 +01:00
Luca
92ea3cf5a0 TLS certificate improvements 2020-01-02 09:36:31 +01:00
emanuele-f
4621a8f409 Reload the periodic scripts when the configuration changes 2019-12-31 19:31:03 +01:00
emanuele-f
87c336a4aa Reduce cpu usage due to the loading of flow.lua
The FlowAlertCheckLuaEngine is now cached into the (reused) vm, so it is reloaded
only when needed (e.g. a script on disk changes).
2019-12-31 18:27:14 +01:00
emanuele-f
098647bce9 Fix community periodic scripts execution 2019-12-31 17:22:19 +01:00
emanuele-f
458a773a93 Refactor internal scripts for cleaner code 2019-12-31 16:53:32 +01:00
Simone Mainardi
7a2def354a Moves unused code to attic 2019-12-31 16:07:09 +01:00
Simone Mainardi
cc49cdc1af Implements per-interface pref to discard probing traffic 2019-12-31 10:15:54 +01:00
Simone Mainardi
fb7f2d553e Implements scanners detection using radix trees 2019-12-30 20:13:44 +01:00
emanuele-f
03e3613e7e Fix IPv6 validator 2019-12-30 15:44:47 +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
Luca Deri
fb260271d7 File copy fix for non-Unix platforms 2019-12-26 20:54:54 +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
8b7d711a36 Add option to disable flow user scripts invocation 2019-12-23 18:03:19 +01:00
emanuele-f
b106c57728 Configsets targets validation 2019-12-20 15:57:56 +01:00
emanuele-f
c6c6c46132 Implement configsets target hosts CIDR match 2019-12-20 14:27:38 +01:00
Luca Deri
fb990bf038 Merge branch 'dev' of https://github.com/ntop/ntopng into dev 2019-12-20 12:07:11 +01:00
Luca Deri
941c017ac1 Compilation fixes 2019-12-20 12:06:57 +01:00
emanuele-f
d44061f529 Expose ndpi_ssl_version2str to Lua 2019-12-20 10:25:54 +01:00
Alfredo Cardigliano
65da842176 Add ntopng service restart to the menu 2019-12-19 18:08:22 +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
08f6c29aa6 Fixes patricia tree initialization 2019-12-17 18:52:50 +01:00
Simone Mainardi
bebaee1446 Minor cleanup 2019-12-17 17:33:47 +01:00
Simone Mainardi
34387c4121 Fixes os detection and set in network discovery 2019-12-17 17:29:21 +01:00
Simone Mainardi
fdba617b0d Fixes discovery for loopback interfaces 2019-12-17 14:27:35 +01:00
Alfredo Cardigliano
e1bc445961 Checking if current version is < available version (to handle manual updates) 2019-12-17 11:09:05 +01:00
Alfredo Cardigliano
eed2601a1e Warning fix 2019-12-17 10:10:46 +01:00
Simone Mainardi
9b72f134cc Fixes switch interface for nologin users 2019-12-16 19:50:17 +01:00
emanuele-f
cdc154f700 Fix for missing error messages in loaded scripts 2019-12-16 12:25:27 +01:00
emanuele-f
b6cef08bea Fix spurious configuration save requests due to interface switching
Switching the active network interface triggered a POST request, which
was interpreted by the active lua script as a configuration save request.
Now in case of interface switching a 302 redirection is performed to clear
the page state.

Fixes #3126
2019-12-13 14:53:44 +01:00
Simone Mainardi
0ce4ebad97 Dropbox code cleanup 2019-12-13 10:43:08 +01:00
Alfredo Cardigliano
0ef242feb1 Show updates menu when installing from packages only 2019-12-12 10:17:15 +01:00
emanuele-f
bb0974a645 Ensure that permissions on plugins files are correct 2019-12-11 18:38:42 +01:00
Simone Mainardi
f71194a062 Minor cleanup 2019-12-10 14:33:21 +01:00
Simone Mainardi
4afa348f89 Fixes possibly invalid icmp echo id 2019-12-10 14:26:27 +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
4bac6dfd85 DNS queries pie chart fix 2019-12-05 17:14:02 +01:00
Alfredo Cardigliano
d69276396f Replace Interfaces dropdown with Interface stats link and interface selector 2019-11-27 17:28:48 +01:00
Simone Mainardi
188ec66c25 Implements scriptable SNMP devices alerts 2019-11-22 18:00:31 +01:00
Alfredo Cardigliano
88a2c9c36f Email Notification improvements: add smtps support, add username/password configuration 2019-11-22 11:34:22 +01:00
Simone Mainardi
5b81a3ab9e Implements low goodput calculation in lua 2019-11-21 16:37:33 +01:00
Simone Mainardi
a893e0a2c0 Implements IP addresses retrieval by Mac address 2019-11-20 18:44:01 +01:00
Simone Mainardi
9cb566ed41 Computes lua scripts deadlines in C to prevent missing scheduled activities 2019-11-19 13:02:13 +01:00
emanuele-f
3dd7d2215d Remove matchesL7 call 2019-11-15 16:58:59 +01:00
emanuele-f
7d0888d302 Flow user scripts optimizations 2019-11-15 15:52:36 +01:00
Alfredo Cardigliano
e38835a603 Rename SSL to TLS (fix #3013) 2019-11-15 12:40:01 +01:00
emanuele-f
60fc7e0cfb Improve flow.lua and add statistics 2019-11-15 10:51:19 +01:00