Page 1 of 1

R3.3 no longer displays graphs for disk usage services.

Posted: Mon Aug 27, 2012 3:44 pm
by nagiosadmin42
After the R3.3 upgrade, we noticed that our disk usage services no longer display the performance graphs. These services usually have special characters in the name, e.g. "Disk Usage /dev/sda1" which has the performance data file name "Disk_Usage__dev_sda1.rrd" (where blanks and special characters have been converted to underscores).

I tracked it down to /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php which was modified on the R3.3 release to URL-encode the service name:

Code: Select all

"servicename" => $service,
is now:
"servicename" => urlencode($service),
Whatever gets passed this URL-encoded string must not be decoding it correctly, as the Performance Graphs tab says "No performance graphs were found for this service."

For now, I've restored status-object-detail.inc.php to the previous version.

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Mon Aug 27, 2012 5:02 pm
by scottwilkerson
Just to verify can you confirm that after restoring just that file is it working as expected?

Thanks

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Mon Aug 27, 2012 6:53 pm
by nagiosadmin42
Hi Scott,

Yes, after restoring the one file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php
to its pre-R3.3 version, the disk usage graphs are displayed in the Performance Graphs tab.

Alan

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Tue Aug 28, 2012 9:24 am
by mguthrie
Ok, we'll have to play around with that. The patch applied for 3.3 fixed a different bug related to \ in the service descriptions. (sigh). Thanks for the heads up.

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Thu Aug 30, 2012 2:31 pm
by nagiosadmin42
I was working on a different problem and happened to run across /usr/local/nagiosxi/html/includes/components/pnp/pnp.inc.php, which is used for the calling sequence:

Code: Select all

pnp_chart_exists()
  pnp_get_perfdata_file()
    pnp_convert_object_name()
From this quick glance at the code, it appears pnp_convert_object_name() is where the URL-encoded service name should be decoded before applying preg_replace() to remove special characters.

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Tue Sep 04, 2012 4:49 pm
by scottwilkerson
Thanks for the digging, we are sending this to developers for a bug fix...

Re: R3.3 no longer displays graphs for disk usage services.

Posted: Mon Sep 10, 2012 1:39 pm
by mguthrie
Thanks for the pointers, made for a quick fix. Fixed in SVN for next release!