Wrong "Current Value" THOLD
Describe the bug Incorrectly displayed "current value on 10G ports and port-channel" configured (CDEF convert bytes to bits) periodically shows incorrect value. Examples of the problem are given in the screens. Also is it possible to make a single template for 10G + ports and apply. Because at the moment for each port I select values separately which is not convenient. But also periodically sends incorrect data to alert. Thold installed via Git v1.5.2
Screenshots



The system is installed on a Proxmox server Cacti Version 1.2.19 Cacti OS unix RRDtool Version Configured 1.6.0+ RRDtool Version Found 1.6.0 Devices 751 Graphs 22,963 Data Sources Script/Command: 6 SNMP Get: 818 SNMP Query: 15,637 Script Server: 406 Total: 16,867
Interval 300 Type SPINE 1.2.19 Copyright 2004-2021 by The Cacti Group Items Action[0]: 61,800 Action[1]: 6 Action[2]: 406 Total: 62,212 Concurrent Processes Name: Main Poller, Procs: 12 Max Threads Name: Main Poller, Threads: 35
Is there anyone?
We are off working on other things at the moment. You are free to create a pull request though.
actual traffic_out = 99Mbit. You are using CDEF convert bytes to bits, so 99 * 8 = 792Mbit ... I thing that here is problem. Your traffic_out is in mbits and you are trying convert in again.
same problem is #540 , #549, #551 I thing that there were more problems:
-
graph says that traffic_in = 10mbit/s, but thold says traffic_in last = 80mbit (incorrect, used data manipulation/cdef bytes to bits). I cannot reproduce this with cacti 1.2.23 and thold 1.6
-
graph says that traffic_in = 10mbit/s, thold says traffic_in last = 10mbit (correct) but data source item[traffic_in] says = 640Mbit. moretime used CDEF. I cannot reproduce this with cacti 1.2.23 and thold 1.6
-
graph says that traffic_in = 10mbit/s, thold says traffic_in last = 10mbit (correct) but data source item[traffic_in] says = 80 Mbit. It is caused by data manipulation. For last traffic_in is used thold_format_number($td['lastread'], 2, $baseu, $suffix, $show_units), for data source item is used thold_format_number(thold_get_column_by_cdef($thold_data, 'lastread'), 2, $baseu, $suffix, $show_units) So two different values could be displayed (when any data manipulation).
For me easy fix is remove thold_get_column_by_cdef from displaying data source item. @TheWitness What do you thing? Is it correct?
From my perspective, a pull request would be beneficial.
ok, I will prepare small PR
Resolved.