ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.18k stars 648 forks source link

Active Monitoring not working on Debian Bullseye distributed package #8386

Closed alexolivan closed 3 months ago

alexolivan commented 4 months ago

Environment:

What happened: AM does nothing. Log states /usr/share/ntopng/scripts/lua/modules/am_utils.lua failure: round() function is not defined

Workaround: Added at the top of the script the folling:

require "lua_utils"
local format_utils = require "format_utils"

How did you reproduce it? Just try to setup AM. It never gets any value/data

Debug Information:

MatteoBiscosi commented 3 months ago

hi @alexolivan which kind of active monitoring type did you configure?

alexolivan commented 3 months ago

Hi.

Initially, as I was struggling to have any AM results, I just simply setup a ICMP ping to 8.8.8.8

However, although certainly not sure, I feel that the kind of monitoring type shouldn't matter in this case, since the issue is that the round() function, used by the code on the script, is not 'included' from the the appropriate 'utils' lib.

Initially I just searched for the round() function, and I found that it sat at some 'utils' script (don't recall which one). Then took a look at other similar scripts calling round(), and I confirmed they were 'requiring' some of those util/libs scripts. So I simply 'copy/pasted' the 'requiring' stuff somewhere at am_utils.lua , and voila! ...that was it. If round() at am_utils.lua is to be found somehow other way, then, that way is not working,

Cheers.

MatteoBiscosi commented 3 months ago

Hi @alexolivan sorry for the late response, i should have fixed the issue (tested and fixed on deb11), so in a couple of hours you should be able to update and the issue should be gone, please let me know.

MatteoBiscosi commented 3 months ago

Verified as fixed, please reopen if needed