Some cacti single-item graphs are broken due to cacti hexadecimal transformation

Bug #1155513 reported by Roman Vynar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Fix Released
High
Unassigned

Bug Description

At least the following graphs are broken:
- Mysql Innodb Semaphore Waits;
- Mysql Innodb Semaphore Wait Time;
- Mysql Innobd Lock Structures;
and some more but it depends.

Cacti poller has a bug which checks a single-item output for hexadecimal number.

For example, Mysql Innodb Semaphore Waits graph uses the following script output:
ke:0

And it is usually zero. What poller.php does:

php > include('/usr/share/cacti/lib/functions.php');
php > $value = 'ke:0';
php > if (is_hexadecimal($value)) { echo 'yes'; }
yesphp >

Then it converts "ke:0" into decimal 224 (0xE0). Thus this graph's default value is 224 instead of 0.
The same with Mysql Innodb Semaphore Wait Time graph: kf:0 -> 240 (0xF0).
We can see these numbers on the graphs.

And all other graphs that use a single-item variable name matching /[a-fA-F0-9]/ i.e. ke, kf, j1 etc. with the output value equals to zero or something small.

To fix the issue it might be worth to rename all XY output variables for both ss_get_mysql_stats.php and ss_get_by_ssh.php scripts avoiding /[a-fA-F0-9]/ i.e.:
gg
gh
...
gz
hg
hh
...
hz
ig
...
...
zz

(26-6)^2=400 combinations - pretty enough as up to 200 are in use.

Tags: cacti
Changed in percona-monitoring-plugins:
status: New → In Progress
importance: Undecided → High
milestone: none → 1.0.3
tags: added: cacti
Changed in percona-monitoring-plugins:
status: In Progress → Fix Committed
Changed in percona-monitoring-plugins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.