Page 1 of 1

Monitoring vmware host from configuration wizard

Posted: Mon May 21, 2018 8:12 am
by user1234
Hello.

I'm trying to monitor vmware hosts.
But i'm confused where i can set thresholds warnings?
As per wizard configuration (screen attached) there is many metrics to choose.
But after then there is no settings to set tresholds.

Do i need edit every service (for multiple hosts) and add there additional command like for cpu (-s usage -w80 -c90 -t60 ).

Or there is any easiest way to do it?

Re: Monitoring vmware host from configuration wizard

Posted: Mon May 21, 2018 11:29 am
by lmiltchev
Specifying thresholds hasn't been added to the vmware wizard, because it would be a very complicated task. The check_esx3.pl uses many "subcommands" for various metrics. Setting a warning or a critical threshold wouldn't make any sense unless you specify a "subcommand". I will give you a simple example. From the plugins usage:
Host specific :
* cpu - shows cpu info
+ usage - CPU usage in percentage
o quickstats - switch for query either PerfCounter values or Runtime info
+ usagemhz - CPU usage in MHz
o quickstats - switch for query either PerfCounter values or Runtime info
^ all cpu info
As you can see, if you don't use a subcommand (usage or usagemhz), you would be monitoring both metrics. Specifying thresholds in this case won't be very useful.

Examples:
Here, the plugin returns OK state, as the usage is below the warning and critical thresholds.

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl -H "x.x.x.x" -f "/usr/local/nagiosxi/etc/components/vmware/VVMWARE_HOST_auth.txt" -l "CPU" -s usage -w 40 -c 50
CHECK_ESX3.PL OK - cpu usage=32.24 % | cpu_usage=32.24%;40;50
The same thresholds return CRITICAL, when you monitor the CPU usage in MHz.

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl -H "192.168.7.20" -f "/usr/local/nagiosxi/etc/components/vmware/VVMWARE_HOST_auth.txt" -l "CPU" -s usagemhz -w 40 -c 50
CHECK_ESX3.PL CRITICAL - cpu usagemhz=13588.00 MHz | cpu_usagemhz=13588.00MHz;40;50
If you didn't specify a "subcommand" though, the return code would be OK.

With some checks, you monitor several metrics at the same time but you may be interested in only monitoring one or two of them. Each one would require different warning and critical thresholds...

There isn't any good way, as far as I know, to add thresholds in bulk to many checks with one go. You will have to do this manually in the CCM.

Note: Initially, I was thinking of using the Bulk Modifications Tool, in which you can change arguments for hosts and services. However, you cannot append arguments. If you don't include the existing args (leave the fields blank), they will be wiped out. In order to find out what your existing args are, you will need to log in the CCM, and review your service config. Once, you long in the CCM, you might as well modify the args there... I hope this makes sense.

Re: Monitoring vmware host from configuration wizard

Posted: Wed May 23, 2018 8:33 am
by user1234
So generally eg. when cpu usage will run to 100% pernamently i will be not informed about that ? (when using standard vmware wizard)
So its "passive" monitoring - and we need serach in hosts to find where is problem (if occuerd)?

I did new service and attach it to esxi host groups, with cpu checking with threshold warnings.

Re: Monitoring vmware host from configuration wizard

Posted: Wed May 23, 2018 8:53 am
by user1234
I did test and high cpu is still ok without threeshold...

CPU Usage for VMHost Ok 2d 0h 52m 8s 1/5 2018-05-23 15:42:59 CHECK_ESX3.PL OK - cpu usage=7889.00 MHz (98.88%)

Re: Monitoring vmware host from configuration wizard

Posted: Wed May 23, 2018 12:06 pm
by lmiltchev
You are getting OK because by default, there is no threshold set.

From the plugin's usage:
-w, --warning=THRESHOLD
Warning threshold. See
http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT
for the threshold format. By default, no threshold is set.
-c, --critical=THRESHOLD
Critical threshold. See
http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT
for the threshold format. By default, no threshold is set.
You will need to add thresholds to your checks manually. The wizard can only do so much, because of the way the plugin it uses is designed.

I can file an internal feature request on your behalf (if you'd like) for adding the threshold options to the vmware wizard. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team. Thank you!

Re: Monitoring vmware host from configuration wizard

Posted: Thu May 24, 2018 4:15 am
by user1234
I can file an internal feature request on your behalf (if you'd like) for adding the threshold options to the vmware wizard. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team. Thank you!
Please do it, thanks!

Re: Monitoring vmware host from configuration wizard

Posted: Thu May 24, 2018 8:36 am
by lmiltchev
The feature request has been filed, pending approval. Thank you!