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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

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

Post by scottwilkerson »

Just to verify can you confirm that after restoring just that file is it working as expected?

Thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

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

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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.
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

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

Post by scottwilkerson »

Thanks for the digging, we are sending this to developers for a bug fix...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post by mguthrie »

Thanks for the pointers, made for a quick fix. Fixed in SVN for next release!