Commit graph

509 commits

Author SHA1 Message Date
Luca Deri
240dd7330a Added marker for DNS, DHCP, SMTP, NTP servers 2020-10-12 11:07:41 +02:00
Simone Mainardi
fdf0f15140 Fixes races in view interfaces and cli/srv scores
Fixes #4513
Fixes #4512
2020-10-02 16:34:28 +02:00
Luca Deri
79e749c769 Extended host with new methods for detecting broadcast and multicast addrsesses 2020-10-01 22:14:30 +02:00
Simone Mainardi
f0a2aba619 Simplifies incNumFlows/decNumFlows for Hosts 2020-10-01 14:28:13 +02:00
Simone Mainardi
fa96c5e2f5 Code cleanup 2020-10-01 14:20:07 +02:00
Simone Mainardi
90a5a57b36 Implements user script queues (avoids 5-sec HT walk) 2020-09-28 11:45:00 +02:00
Luca Deri
930e4c362d Fixes #4320
Implements peak score of the last minute
2020-09-23 13:51:40 +02:00
Simone Mainardi
841dacd4cd Simplifies per-category host score 2020-09-21 11:44:00 +02:00
Simone Mainardi
db0d7730a8 Implements per-category host score
Implements #4413
2020-09-18 18:34:28 +02:00
Luca Deri
8cf5d706f8 Added DHCP server detection 2020-08-05 11:32:40 +02:00
Simone Mainardi
1baa7d6cc4 Avoids double 5-sec HT-walks to update stats 2020-07-27 14:22:59 +02:00
Luca Deri
84bd93f903 Implemented periodicity stats 2020-07-20 22:44:23 +02:00
Alfredo Cardigliano
0a84d0706e Add DSCP stats to the host, new DSCPStats class 2020-07-17 18:05:11 +02:00
Luca Deri
35876b871e Added --pcap-file-purge-flows for forcing purge on pcap files (debug only)
Local host BA improvements
2020-07-15 17:20:57 +02:00
Luca Deri
f2c3ee137c Host stats cleanup 2020-07-13 23:56:46 +02:00
Luca Deri
a27eedaeef Implemented cardinarily information report in hsot
Fixes #4005
2020-06-13 00:00:30 +02:00
Luca Deri
32f38e6d8b Port cardinality implementation 2020-06-12 11:07:44 +02:00
Luca Deri
9445dcb6b8 Introduced cardinality count 2020-06-12 08:11:05 +02:00
emanuele-f
ec51278c20 Cleanup of HostStats 2020-05-20 17:05:30 +02:00
emanuele-f
898811ff6f Fix MDNS/Netbios names mixed with host labels
Addresses #3677
2020-05-08 12:12:52 +02:00
Alfredo Cardigliano
e32b29d9bf Get host label 2020-04-01 10:34:29 +00:00
Simone Mainardi
43284e22f8 Fixes crash and removes unused PortContactStats
Class was not used and didn't handle concurrent accesses to strings,
yielding crashes such as

Thread 14 "stats_update.lu" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb3fff700 (LWP 25268)]
0x00005555556b9183 in IpAddress::intoa (this=0x28c, buf=0x7fffb3ffe030 "", bufLen=64, bitmask=255 '\377') at src/IpAddress.cpp:352
352     src/IpAddress.cpp: No such file or directory.
(gdb)
(gdb) bt
    at src/GenericHash.cpp:222
    #9  0x00005555556c0413 in NetworkInterface::walker (this=0x555556159e70, begin_slot=0x7fffb3ffe454, walk_all=true, wtype=walker_flows, walker=0x5555556c6b79 <host_flow_update_stats(GenericHashEntry*, void*, bool*)>,
        user_data=0x7fffb3ffe458) at src/NetworkInterface.cpp:795
	#10 0x00005555556c6f7c in NetworkInterface::periodicStatsUpdate (this=0x555556159e70, vm=0x7fffac0a5578) at src/NetworkInterface.cpp:2589
	#11 0x0000555555671d62 in ntop_periodic_stats_update (vm=0x7fffac0a5578) at src/LuaEngine.cpp:6304
	#12 0x000055555576c2f6 in luaD_precall ()
	#13 0x0000555555777acd in luaV_execute ()
	#14 0x000055555576c5cf in luaD_call ()
	#15 0x000055555576c621 in luaD_callnoyield ()
	#16 0x000055555576ba42 in luaD_rawrunprotected ()
	#17 0x000055555576c91b in luaD_pcall ()
	#18 0x0000555555769cd4 in lua_pcallk ()
	#19 0x0000555555681e8a in LuaEngine::run_loaded_script (this=0x7fffac01fe10) at src/LuaEngine.cpp:12188
	#20 0x000055555563eca2 in ThreadedActivity::runScript (this=0x555562aee4e0, now=1585309410, script_path=0x7fff88002620 "/usr/share/ntopng/scripts/callbacks/interface/stats_update.lua", iface=0x555556159e70, deadline=1585309420)
	    at src/ThreadedActivity.cpp:418
	    #21 0x00005555556ba04d in ThreadPool::run (this=0x5555624525a0) at src/ThreadPool.cpp:103
	    #22 0x00005555556b9c79 in doRun (ptr=0x5555624525a0) at src/ThreadPool.cpp:31
	    #23 0x00007ffff65aa6db in start_thread (arg=0x7fffb3fff700) at pthread_create.c:463
	    #24 0x00007ffff3ea388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
2020-03-27 13:36:51 +01:00
Alfredo Cardigliano
dc4431f71b Move names reset in case of data reset 2020-03-27 11:17:22 +00:00
Alfredo Cardigliano
18a15a8b86 Reset host names when setting the name from Lua 2020-03-27 10:58:14 +00:00
emanuele-f
94f175194b Initial changes for MUD recording 2020-03-04 17:05:53 +01:00
Luca Deri
e55854aaff Initial work on host bins 2020-01-27 11:55:00 +01:00
emanuele-f
566b9ece0b Score changes
- Move score from status definition to user scripts
- Separate flow score counter from the peers score
- Create a new HostScore class to hold the score data
2020-01-16 18:11:14 +01:00
emanuele-f
01d5d83f21 Account host score also on volatile flows (e.g. scans)
Such flows may go idle too early and miss the minute.lua iteration
2020-01-16 14:08:49 +01:00
emanuele-f
c336cca0e7 Improve host score calculation 2020-01-15 18:42:48 +01:00
emanuele-f
6edecb12cb Score visualization improvements 2020-01-15 15:27:45 +01:00
emanuele-f
d7528e1628 Score improvements
The score is now calculated differently on the client and on the server of the flow.
The hosts flow is updated every minute and charted.
It's now possible to trigger an alert when the score threshold is exceeded
2020-01-15 12:34:16 +01:00
Alfredo Cardigliano
55b1ca75a9 Replace anomalous with misbehaving to avoid inconsistencies (fix #2866) 2020-01-14 15:49:19 +01:00
emanuele-f
93a96eb214 Code cleanup 2020-01-13 15:20:38 +01:00
Simone Mainardi
3ef133cd35 Fixes hosts one/two way traffic 2020-01-09 16:41:22 +01:00
Simone Mainardi
76391ff6a5 Resores flow alerts for view interfaces 2020-01-08 18:18:00 +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
417c4a3146 Reworks handling of TCP flags for both ZMQ and packet interfaces
This commit allows simplifies the code and also allows flags-based alerts
to be triggered for packet and non-packet interfaces

Fixes #3167
2020-01-02 19:21:44 +01:00
Simone Mainardi
8a169991cb Minor method name change 2020-01-02 15:18:49 +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
Simone Mainardi
2abb8cfde5 Reworks flow scripts deadlines 2019-12-27 20:50:53 +01:00
emanuele-f
8b7d711a36 Add option to disable flow user scripts invocation 2019-12-23 18:03:19 +01:00
Simone Mainardi
ba13e49856 Updates vlans, pools, ases stats for view interfaces 2019-12-13 18:49:29 +01:00
Simone Mainardi
0a7d677beb Handles offline MDNS updates 2019-12-13 16:54:13 +01:00
Simone Mainardi
69453397a5 Handles offline MDNS updates 2019-12-13 16:47:18 +01:00
Simone Mainardi
a65b6efc7c Implements icmp hosts stats for view interfaces 2019-12-13 13:06:26 +01:00
Simone Mainardi
0ce4ebad97 Dropbox code cleanup 2019-12-13 10:43:08 +01:00
Simone Mainardi
4a9ac03cb4 Implements dns hosts stats for view interfaces 2019-12-13 09:58:09 +01:00
Simone Mainardi
4bac6dfd85 DNS queries pie chart fix 2019-12-05 17:14:02 +01:00
Simone Mainardi
5b81a3ab9e Implements low goodput calculation in lua 2019-11-21 16:37:33 +01:00
emanuele-f
54140b6f1a Migrate alertable disabled alerts preference to lua
This avoids performing multiple hget on redis, thus increasing performance
2019-11-05 14:59:38 +01:00