Commit graph

86 commits

Author SHA1 Message Date
Simone Mainardi
83209ac402 Keeps alerted hosts in memory (fixes engaged alert counter out of sync)
Fixes #4506
2020-10-05 11:54:17 +02:00
Luca Deri
80dfd37e04 Reworked baheviour analysis code 2020-09-28 12:55:37 +02:00
Luca Deri
dd062dcc09 Behaviour analysis is not disabled by default 2020-07-22 09:39:47 +02:00
Luca Deri
84bd93f903 Implemented periodicity stats 2020-07-20 22:44:23 +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
e1444c0422 Lua table indexing fix 2020-07-15 00:03:06 +02:00
Luca Deri
1f2f1fd25d BA improvemements 2020-07-14 18:14:59 +02:00
Simone Mainardi
d05c191cc7 Implements lua class local_network_pools.lua to handle network pools 2020-07-08 14:42:48 +02:00
Luca Deri
32f38e6d8b Port cardinality implementation 2020-06-12 11:07:44 +02:00
Luca Deri
9a180bc958 Merge branch 'dev' of https://github.com/ntop/ntopng into dev 2020-06-12 08:35:07 +02:00
Luca Deri
4a2daf53eb Grouped cardinality counters in lua export 2020-06-12 08:34:10 +02:00
Simone Mainardi
f5ef8f8a15 Fixes attempt to index a number value 2020-06-12 08:33:36 +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
340462ad73 Cleanup of the timeseries ring and NetworkInterfaceTsPoint 2020-05-20 15:18:03 +02:00
emanuele-f
d65bd41212 Implement proper LBD host restore 2020-05-05 12:20:40 +02: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
emanuele-f
94f175194b Initial changes for MUD recording 2020-03-04 17:05:53 +01:00
Simone Mainardi
af2ae8e3f5 Fixes arbitrarily broadcast domain when deserializing 2020-02-03 17:37:53 +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
02464a9536 Additionsl inc/dec uses fixes 2019-10-24 17:28:57 +02:00
Simone Mainardi
249f804c4c Handles inc/dec uses after new hash entries purging 2019-10-24 16:58:08 +02:00
Simone Mainardi
da1dbe4ab0 Reworks hash entries idling 2019-09-24 14:29:20 +02:00
emanuele-f
c3fa094e99 Improve MUD prefs handling
Also implement a non-inline reloadPrefs Host method to avoid slowing down packet capture
2019-09-10 11:10:33 +02:00
emanuele-f
06f3077da8 Avoid excessive redis lookups for hosts when hosts cache is disabled 2019-09-09 12:42:35 +02:00
emanuele-f
48d688d501 Add support for MAC MUD 2019-09-06 15:53:15 +02:00
emanuele-f
2b2a74af79 Fix bad time resolution of values for some host exported timeseries
- active_flows.as_client
- active_flows.as_server
- total_flows.as_client
- total_flows.as_server
- contacts.as_client
- contacts.as_server
- DNS, TCP, ICMP stats

Fixes #2776
2019-08-21 15:37:17 +02:00
Simone Mainardi
74c545d079 Uses stats rather than grouped hosts data for network stats 2019-08-19 17:39:51 +02:00
Simone Mainardi
e1bdb8887c Performs local hosts serialization in set_hash_entry_state_idle 2019-08-12 14:40:54 +02:00
Emanuele Faranda
c829c4c3c3
Unify os (#2755)
* Unify OS information.

Now OS information is only stored into the Host. The lua uses numeric IDs to handle OS.

* Fix network discovery OS

* Show OS detail into the host details page
2019-08-08 12:09:51 +00:00
Luca Deri
0fd7d9fb26 Further fixes 2019-07-31 17:08:50 +02:00
Luca Deri
0eb9407de4 Minor changes 2019-07-25 09:59:44 +02:00
Luca Deri
084a48fdb3 Merge branch 'dev' of https://github.com/ntop/ntopng into dev 2019-07-22 15:58:35 +02:00
Luca Deri
e0563d28bc Improved host port stats 2019-07-22 15:49:39 +02:00
Simone Mainardi
9b6714823a Implements hash entries lifecycle as a finite states machine
Fixes certain sporadic race conditions
2019-07-22 15:18:39 +02:00
Luca Deri
9634a89247 Port detection improvements 2019-07-18 09:02:35 +02:00
Luca Deri
3b3af9bb9f Implemented local hosts services hashes 2019-07-15 23:36:45 +02:00
Luca Deri
6a547616e2 Implemented local hosts ports stats 2019-07-15 18:55:11 +02:00
Simone Mainardi
5c3c2ae30c Removes unnecessary locks when accessing the mac addresses hash 2019-07-05 11:31:15 +02:00
emanuele-f
b5ce655cde Fix missing first/last seen serialization in countries/as/vlan 2019-05-29 11:05:26 +02:00
emanuele-f
e74f6ee3b7 Fix host timeseries first point problem.
An additional point is now stored on the ts database to address the issue.

Fixes #2184
2019-05-28 17:17:21 +02:00
emanuele-f
8fcce457c9 Implement countries serialization
Countries now show the cumulative traffic since ntopng restart as this is consistent with the other views
2019-05-27 13:07:30 +02:00
Emanuele Faranda
c09199690f
Unify serialization to redis and implement VLAN/AS serialization (#2610) 2019-05-27 08:11:20 +00:00
emanuele-f
14a9d83a30 Move local broadcast domain preference to the interface settings and show warnings
A dismissable warning is shown if DHCP traffic has been seen on the currrent interface.
2019-04-11 12:52:15 +02:00
Luca Deri
ea4619dd2f Reworked local broadcast domain implementation 2019-03-12 16:54:29 +01:00
Luca Deri
468558ddb4 Adding a new timeseries: how to add number of unrecheable flows client/server per host. 2019-03-06 10:05:05 +01:00
emanuele-f
347bc2062e Simplify host serialization keys by using the isDhcpHost info 2019-02-26 18:45:29 +01:00
emanuele-f
b778e77207 Initial support for DHCP range configuration 2019-02-26 18:08:02 +01:00
emanuele-f
4d1c777940 Improve device deserialization logic 2019-02-25 15:41:58 +01:00
emanuele-f
905700d4e2 Reuse get_mac_based_tskey to avoid format differences 2019-02-22 16:28:31 +01:00