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.
Problem with thresholds on VM monitoring
Re: Problem with thresholds on VM monitoring
Most probably this doesn't work for you as the cpu option includes both, the usage in % and usage in MHz...
Example:
You need to add a sub-command, using the "-s" flag in order to specify the value of interest.* cpu - shows cpu info
+ usage - CPU usage in percentage
+ usagemhz - CPU usage in MHz
^ all cpu info
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 2Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Problem with thresholds on VM monitoring
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.
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.
Re: Problem with thresholds on VM monitoring
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!
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!
Re: Problem with thresholds on VM monitoring
It helped - thank you.