Problem with thresholds on VM monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Ivajlo911
Posts: 38
Joined: Thu Mar 23, 2017 3:19 am

Problem with thresholds on VM monitoring

Post by Ivajlo911 »

Hi,
We have a problem with plugin for VMware agent-less monitoring. problem is described in detail below:

when we try to set thresholds (with "-w 1 -c 2") to VMWARE monitoring service, there
aren't any difference then before that:

[[email protected] ~]$ /usr/local/nagios/libexec/check_esx3.pl
-H "10.10.10.10" -f "/usr/local/nagiosxi/etc/components/vmware/Vcenter_GENENFBLB01_auth.txt"
-N "GENENFBLB01" -l "CPU" -w 1 -c 2

ESX3 OK - "GENENFBLB01" cpu usage=172.00 MHz(2.04%) wait=19785.00 ms | cpu_usagemhz=172.00Mhz;1;2 cpu_usage=2.04%;1;2 cpu_wait=19785.00ms;1;2

As you can see, service returns OK, despite that CPU is loaded over
2%... Everything continue to be GREEN.

Details on installation:
CentOS Linux release 7.3.1611 64 bit
Nagios XI 5.4.7
Manual Install of XI
No special configurations on your system, ie; is Gnome installed
No proxy
Using SSL


Thank you.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problem with thresholds on VM monitoring

Post by lmiltchev »

Most probably this doesn't work for you as the cpu option includes both, the usage in % and usage in MHz...
* cpu - shows cpu info
+ usage - CPU usage in percentage
+ usagemhz - CPU usage in MHz
^ all cpu info
You need to add a sub-command, using the "-s" flag in order to specify the value of interest.

Example:

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl -H "10.10.10.10" -f "/usr/local/nagiosxi/etc/components/vmware/Vcenter_GENENFBLB01_auth.txt" -N "GENENFBLB01" -l "CPU" -s usage -w 1 -c 2
Be sure to check out our Knowledgebase for helpful articles and solutions!
Ivajlo911
Posts: 38
Joined: Thu Mar 23, 2017 3:19 am

Re: Problem with thresholds on VM monitoring

Post by Ivajlo911 »

Hi,
thanks for the update:

When we perform the following:
usr/local/nagios/libexec/check_esx3.pl
-H "10.10.10.10" -f "/usr/local/nagiosxi/etc/components/vmware/Vcenter_GENENFBLB01_auth.txt"
-N "GENENFBLB01" -l "CPU" -w 1 -c 2
with + "-s usage"
it starts working as expected
the main problem is that we cannot add it when creating the host in Nagios and when after that we modify service this fully damages the data in the diagrams.
There seems to be no choice to select thresholds options when creating a VMWare host in Nagios.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problem with thresholds on VM monitoring

Post by lmiltchev »

Unfortunately, at this time there is no option in the vmware wizard to add sub-commands. I added a feature request for adding this functionality, which is pending approval. The reason why the performance data graphs break is because in the original check there are two datasources - cpu_usagemhz and cpu_usage. Modifying the check removes one of them from the perfdata output, which breaks the graphs. There are two possible workarounds the way I see it:

1. This is the easy one. If you don't care about the "old" perfdata (prior to modifying the check), just delete the rrd and xml file for the cpu usage check in "/usr/local/nagios/share/perfdata/<hostname>/" directory. Wait for 15-20 min. The rrd and xml files will be recreated, and the graphs will start showing up again.

2. This method is a bit more involved. You can try deleting one of the datasources by following the steps, outlined in the KB article, linked below:

https://support.nagios.com/kb/article/n ... -file.html

Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Ivajlo911
Posts: 38
Joined: Thu Mar 23, 2017 3:19 am

Re: Problem with thresholds on VM monitoring

Post by Ivajlo911 »

It helped - thank you.
bolson

Re: Problem with thresholds on VM monitoring

Post by bolson »

Closing this topic as resolved.
Locked