Skip to content
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

Closed
j66h opened this issue Sep 25, 2019 · 5 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@j66h
Copy link

j66h commented Sep 25, 2019

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
2019-09-25 15_55_15-Console -_ Data Sources -_ (Edit)

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

@j66h j66h changed the title RRD items erroneously marked as false in Data Source Info or Troubleshooter RRD items erroneously marked as false in Data Source Info and Troubleshooter Sep 25, 2019
@cigamit
Copy link
Member

cigamit commented Sep 25, 2019

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.

cigamit added a commit that referenced this issue Sep 26, 2019
RRD items erroneously marked as false in Data Source Info and Troubleshooter
@cigamit cigamit added bug Undesired behaviour resolved A fixed issue labels Sep 26, 2019
@cigamit
Copy link
Member

cigamit commented Sep 26, 2019

Update lib/rrd.php from the 1.2.x branch, and close if resolved.

@cigamit cigamit added this to the v1.2.7 milestone Sep 26, 2019
@j66h
Copy link
Author

j66h commented Sep 26, 2019

Downloaded 1.2.x from today. Problem still there.
Only change I can find comparing to rrd.php from 1.2.x downloaded at 09/23/2019:
old line 247: if (substr($command_line, 0, 5) == 'fetch') {
new line 247: if (substr($command_line, 0, 5) == 'fetch' || substr($command_line, 0, 4) == 'info') {

Do I have the right rrd.php?

cigamit added a commit that referenced this issue Sep 26, 2019
This is a hack since i18n changes may not work by setting localization on Windows.
@cigamit
Copy link
Member

cigamit commented Sep 26, 2019

Okay, try again. Did a hack for OS' that don't support POSIX locale variables. And you had the right file.

@j66h
Copy link
Author

j66h commented Sep 26, 2019

Great. Now ok in Data Source Info and in Data Source Troubleshooter.
Thanxs a lot again :-)

@j66h j66h closed this as completed Sep 26, 2019
@netniV netniV changed the title RRD items erroneously marked as false in Data Source Info and Troubleshooter Datasource Debug does not properly handle European numbers in certain circumstances Sep 28, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants