ntop / ntopng

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

Fix timeseries metadata #7016

Closed uccidibuti closed 1 year ago

uccidibuti commented 1 year ago

The rest API that return timeseries metadata ntopng/scripts/lua/rest/v2/get/timeseries/type/consts.lua presents various bugs: 1) All metric returned with measure_unit = 'number' must have set in 'scale' field the name of the y-axis and not 0. 2) Check SNMP metrics because some of them are always empty (like CPU Load)

NicoMaio commented 1 year ago

The rest API still retrieve metrics like this { "schema": "iface:behavioural_maps", "id": "iface", "measure_unit": "number", "label": "Behaviour: Maps", "priority": 1, "nedge_exclude": true, "timeseries": { "svc_map_entries": { "label": "Service Map Entries", "color": "#c6d9fd" }, "period_map_entries": { "label": "Periodicity Map Entries", "color": "#c6d9fd" } }, "group": "Behaviour", "scale": 0 }

NicoMaio commented 1 year ago

Verified the implementation.