CPU Usage - No matching data to display

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jakai
Posts: 21
Joined: Wed Oct 21, 2020 2:39 am

CPU Usage - No matching data to display

Post by jakai »

Hello,
After updating Nagios XI to version 5.8.7, we have a problem with displaying CPU Usage values in metrics. Can you please help how to fix this error? Are the other data displayed correctly (RAM, Disk, etc.)? :?

Thank you for help.

Best Regards,
Josef Akai
IT Administrator
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: CPU Usage - No matching data to display

Post by benjaminsmith »

Hi Josef,

Thanks for getting in touch and welcome to the Customer Support Forum.

Do you recall what plugin or wizard you used to set up the CPU checks? I'd like to gather some data, can you run the tail command below, load this page and post the output.

Code: Select all

tail -f /var/log/httpd/*error_log
Lastly, please send over a system profile and we'll check the other logs as well.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
jakai
Posts: 21
Joined: Wed Oct 21, 2020 2:39 am

Re: CPU Usage - No matching data to display

Post by jakai »

Hello,
command "tail -f /var/log/httpd/*error_log" not funkcion, see Annex.

I am sending the profile in an attachment.


Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: CPU Usage - No matching data to display

Post by benjaminsmith »

Hi,

I was able to replicate this on my test system and it's a bug. I should be able to get you a patch soon if you would like to correct this before the next release. Let me know.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: CPU Usage - No matching data to display

Post by benjaminsmith »

Hi,

Update. To correct this, open the following file ( a good idea to save a backup to /tmp first):

Code: Select all

/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
Change this line, around 708:

Code: Select all

            if(!empty($perfpartsb[3])) {
                $warn = $perfpartsb[3];
            } else {
                $display = 0;
            }

            if(!empty($perfpartsb[4])) {
                $crit = $perfpartsb[4];
            } else {
                $display = 0;
            }

            $use = floatval(str_replace(str_split('=%'), '', $perfpartsb[2]));
To:

Code: Select all

           if(!empty($perfpartsb[1])) {
                $warn = $perfpartsb[1];
            } else {
                $display = 0;
            }

            if(!empty($perfpartsb[2])) {
                $crit = $perfpartsb[2];
            } else {
                $display = 0;
            }

            $use = floatval(str_replace(str_split("'percent'=%"), '', $perfpartsb[0]));
Let me know if that resolves the issue.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
jakai
Posts: 21
Joined: Wed Oct 21, 2020 2:39 am

Re: CPU Usage - No matching data to display

Post by jakai »

Hello,
I fixed the error according to your instructions and it works! Thank you very much.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: CPU Usage - No matching data to display

Post by benjaminsmith »

Hi,

You're welcome. We'll have an official patch included in the next release.

Thanks for bringing this to our attention. We'll close this out for now, but feel free to open a new post if you need anything.

--Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked