Page 1 of 1

Metrics Visualization not showing data

Posted: Fri Jul 06, 2018 7:53 am
by nagiosEngie
Hello Nagios Crew,
I'm back with a new problem.
When I go to Home->Details ->Metrics I am able to view only the data related the Disk ocupation when i choose a hostgroup (performance02 image). If try to produce the same data with CPU usage I get no information (performance01 image). This happens also with Load, Memory and swap.

Can you please help?

Thanks
SAndro

Re: Metrics Visualization not showing data

Posted: Fri Jul 06, 2018 11:49 am
by lmiltchev
Did you forget to upload the "performance02" image?

Do you see data for individual hosts (when no specific hostgroup is selected from the drop-down menu) for all metrics? How did you set up your CPU/Load/Memory checks? Did you use our "default" wizards, shipped with XI or you used custom plugins?

Note: The Metrics component is somewhat limited in a way that would work well only with the "standard"/"default" checks, created by our wizards, e.g. Linux Server, Windows Server, etc. I you used a 3rd party plugins or if you customized your checks, the data may not be available for you for some of the metrics.

Re: Metrics Visualization not showing data

Posted: Mon Jul 09, 2018 2:17 am
by nagiosEngie
Opss sorry about that.
I have been using wizards to setup my monitoring and bulk install.
So CPU, DISK, MEM, and SWAP are checked with standard wizard procedure.
Without selecting any hostgroupo I do not get any data.
Thanks
Sandro

Re: Metrics Visualization not showing data

Posted: Mon Jul 09, 2018 10:47 am
by lmiltchev
Go to the Metrics component, select "CPU Usage" from the "Metric" drop-down menu. Do NOT select a hostgroup from the "Limit To Hostgroup" drop-down menu. Click on "Run", and show us a screenshot of the page.

Can you PM me (or anyone else on the Nagios Support team) your profile?

Admin > System Profile > Download Profile

Re: Metrics Visualization not showing data

Posted: Tue Jul 10, 2018 8:58 am
by nagiosEngie
Hello,
attached printscreen.
I will PM you the profile.

Sandro

Re: Metrics Visualization not showing data

Posted: Tue Jul 10, 2018 12:31 pm
by lmiltchev
OK, try the following:

1. Make a backup of your original "/usr/local/nagiosxi/html/includes/utils-metrics.inc.php" file:

Code: Select all

cp -p /usr/local/nagiosxi/html/includes/utils-metrics.inc.php /usr/local/nagiosxi/html/includes/utils-metrics.inc.php.orig
2. Open the "/usr/local/nagiosxi/html/includes/utils-metrics.inc.php" file in a text editor, e.g. vim, and change this line (it should be line 188 or close to it):

Code: Select all

} else if (preg_match("/check_xi_ncpa_agent/", $command) > 0) { //NCPA
to this:

Code: Select all

} else if (preg_match("/check_xi_ncpa/", $command) > 0) { //NCPA
Save, exit and check your Metrics component again. Do you see the CPU checks on the page?

Re: Metrics Visualization not showing data

Posted: Wed Jul 11, 2018 5:19 am
by nagiosEngie
Hello,
we are getting closer. For the moment it will visualize only CPUs for the 2 nagios servers.
Attached file (metrics cpu no data02.jpg)

If I try to set a hostgroup I will get no results.

Sandro

Re: Metrics Visualization not showing data

Posted: Thu Jul 12, 2018 9:00 am
by lmiltchev
Hmm, I thought this pattern would work with both, the old and the new command but this may not be the case... Our developers modified this line as such:

Code: Select all

} else if (preg_match("/check_xi_ncpa_agent/", $command) > 0 || preg_match("/check_xi_ncpa/", $command) > 0) { //NCPA
Try that, and see if more metrics will show up. This is the "official" fix, which will be in Nagios XI 5.5.1. If this is still not working for you, then you may have a different issue, and opening a support ticket via our Support Center would be a way to go:

https://support.nagios.com/tickets/