New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datasource Debug does not properly handle European numbers in certain circumstances #2975
Comments
I see the issue. Your system language is an European language, and the function that handles the numeric data is having problems between the period and comma. Thanks for reporting. |
RRD items erroneously marked as false in Data Source Info and Troubleshooter
Update lib/rrd.php from the 1.2.x branch, and close if resolved. |
Downloaded 1.2.x from today. Problem still there. Do I have the right rrd.php? |
This is a hack since i18n changes may not work by setting localization on Windows.
Okay, try again. Did a hack for OS' that don't support POSIX locale variables. And you had the right file. |
Great. Now ok in Data Source Info and in Data Source Troubleshooter. |
Environment
OS: Windows Server 2016 standard
Cacti: 1.2.6 (updated to latest 1.2.x branch as of 09/23/2019)
Spine: 1.2.6
Cygwin: 3.0.7
Net-SNMP: 5.7.3
PHP: 7.3.9
MySQL: 8.0.17
Single server. Just "Main Poller".
Describe the bug
Min, Max and X-Files Factor are marked red (false) in Data Source Info. RRDTOOL tune commands are displayed for min and max. Same information for min and max is displayed in Data Source Troubleshooter.
But Data Source Debug Mode shows correct values in RRDTOOL create command. RRDTOOL info proves that file really was created with correct values.
likely reason
Just a guess, but RRDTOOL info and Data Source Info show flowting point values für Min, Max and XFF. Seems like they are compared to integer values or a string compare is used.
Screenshot,Data Source Info and RRDTool Tune Info

Data Source Debug Mode Info
Data Source Debug c:/rrdtool/rrdtool.exe create \ D:/inetpub/wwwroot/cacti/rra/hldehkr36_isr4k_5min_cpu_12747.rrd \ --start -900 --step 300 \ DS:ISR4k_5min_cpu:GAUGE:600:0:100 \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MIN:0.5:1:600 \ RRA:MIN:0.5:6:700 \ RRA:MIN:0.5:24:775 \ RRA:MIN:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797 \ RRA:LAST:0.5:1:600 \ RRA:LAST:0.5:6:700 \ RRA:LAST:0.5:24:775 \ RRA:LAST:0.5:288:797 \
RRDTOOL info output for same file
D:\inetpub\wwwroot\cacti\rra>c:\rrdtool\rrdtool info hldehkr36_isr4k_5min_cpu_12747.rrd filename = "hldehkr36_isr4k_5min_cpu_12747.rrd" rrd_version = "0003" step = 300 last_update = 1569409566 header_size = 3504 ds[ISR4k_5min_cpu].index = 0 ds[ISR4k_5min_cpu].type = "GAUGE" ds[ISR4k_5min_cpu].minimal_heartbeat = 600 ds[ISR4k_5min_cpu].min = 0,0000000000e+00 ds[ISR4k_5min_cpu].max = 1,0000000000e+02 ds[ISR4k_5min_cpu].last_ds = "2" ds[ISR4k_5min_cpu].value = 1,3200000000e+02 ds[ISR4k_5min_cpu].unknown_sec = 0 rra[0].cf = "AVERAGE" rra[0].rows = 600 rra[0].cur_row = 60 rra[0].pdp_per_row = 1 rra[0].xff = 5,0000000000e-01 rra[0].cdp_prep[0].value = NaN rra[0].cdp_prep[0].unknown_datapoints = 0 rra[1].cf = "AVERAGE" rra[1].rows = 700 rra[1].cur_row = 505 rra[1].pdp_per_row = 6 rra[1].xff = 5,0000000000e-01 rra[1].cdp_prep[0].value = 2,0000000000e+00 rra[1].cdp_prep[0].unknown_datapoints = 0 rra[2].cf = "AVERAGE" rra[2].rows = 775 rra[2].cur_row = 569 rra[2].pdp_per_row = 24 rra[2].xff = 5,0000000000e-01 rra[2].cdp_prep[0].value = 2,6000000000e+01 rra[2].cdp_prep[0].unknown_datapoints = 0 rra[3].cf = "AVERAGE" rra[3].rows = 797 rra[3].cur_row = 686 rra[3].pdp_per_row = 288 rra[3].xff = 5,0000000000e-01 rra[3].cdp_prep[0].value = 2,6600000000e+02 rra[3].cdp_prep[0].unknown_datapoints = 0 rra[4].cf = "MIN" rra[4].rows = 600 rra[4].cur_row = 446 rra[4].pdp_per_row = 1 rra[4].xff = 5,0000000000e-01 rra[4].cdp_prep[0].value = NaN rra[4].cdp_prep[0].unknown_datapoints = 0 rra[5].cf = "MIN" rra[5].rows = 700 rra[5].cur_row = 682 rra[5].pdp_per_row = 6 rra[5].xff = 5,0000000000e-01 rra[5].cdp_prep[0].value = 2,0000000000e+00 rra[5].cdp_prep[0].unknown_datapoints = 0 rra[6].cf = "MIN" rra[6].rows = 775 rra[6].cur_row = 663 rra[6].pdp_per_row = 24 rra[6].xff = 5,0000000000e-01 rra[6].cdp_prep[0].value = 2,0000000000e+00 rra[6].cdp_prep[0].unknown_datapoints = 0 rra[7].cf = "MIN" rra[7].rows = 797 rra[7].cur_row = 96 rra[7].pdp_per_row = 288 rra[7].xff = 5,0000000000e-01 rra[7].cdp_prep[0].value = 2,0000000000e+00 rra[7].cdp_prep[0].unknown_datapoints = 0 rra[8].cf = "MAX" rra[8].rows = 600 rra[8].cur_row = 118 rra[8].pdp_per_row = 1 rra[8].xff = 5,0000000000e-01 rra[8].cdp_prep[0].value = NaN rra[8].cdp_prep[0].unknown_datapoints = 0 rra[9].cf = "MAX" rra[9].rows = 700 rra[9].cur_row = 1 rra[9].pdp_per_row = 6 rra[9].xff = 5,0000000000e-01 rra[9].cdp_prep[0].value = 2,0000000000e+00 rra[9].cdp_prep[0].unknown_datapoints = 0 rra[10].cf = "MAX" rra[10].rows = 775 rra[10].cur_row = 332 rra[10].pdp_per_row = 24 rra[10].xff = 5,0000000000e-01 rra[10].cdp_prep[0].value = 2,0000000000e+00 rra[10].cdp_prep[0].unknown_datapoints = 0 rra[11].cf = "MAX" rra[11].rows = 797 rra[11].cur_row = 221 rra[11].pdp_per_row = 288 rra[11].xff = 5,0000000000e-01 rra[11].cdp_prep[0].value = 2,0000000000e+00 rra[11].cdp_prep[0].unknown_datapoints = 0 rra[12].cf = "LAST" rra[12].rows = 600 rra[12].cur_row = 493 rra[12].pdp_per_row = 1 rra[12].xff = 5,0000000000e-01 rra[12].cdp_prep[0].value = NaN rra[12].cdp_prep[0].unknown_datapoints = 0 rra[13].cf = "LAST" rra[13].rows = 700 rra[13].cur_row = 182 rra[13].pdp_per_row = 6 rra[13].xff = 5,0000000000e-01 rra[13].cdp_prep[0].value = 2,0000000000e+00 rra[13].cdp_prep[0].unknown_datapoints = 0 rra[14].cf = "LAST" rra[14].rows = 775 rra[14].cur_row = 467 rra[14].pdp_per_row = 24 rra[14].xff = 5,0000000000e-01 rra[14].cdp_prep[0].value = 2,0000000000e+00 rra[14].cdp_prep[0].unknown_datapoints = 0 rra[15].cf = "LAST" rra[15].rows = 797 rra[15].cur_row = 584 rra[15].pdp_per_row = 288 rra[15].xff = 5,0000000000e-01 rra[15].cdp_prep[0].value = 2,0000000000e+00 rra[15].cdp_prep[0].unknown_datapoints = 0
The text was updated successfully, but these errors were encountered: