Check_esx3 vfms warning and critical values

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Check_esx3 vfms warning and critical values

Post by ahoward12 »

Hey Gents,

Can anyone actually explain how the warning and critical values work with the vmfs command?

I cannot ascertain how it is working with trial and error. Examples below:

If I use -c 10 I get a return code of OK when there is 6.59% free < 10%

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 10%
CHECK_ESX3.PL OK - Storages : 'Prod-VMs-Data-Drives'(free)=202.28 GB (6.59%) | Prod-VMs-Data-Drives=6.59%;;10


To make this more confusing if I use -c 5 I get critical value when there is 6.59% > than 5%

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5
CHECK_ESX3.PL CRITICAL - Storages : 'Prod-VMs-Data-Drives'(free)=202.25 GB (6.58%) | Prod-VMs-Data-Drives=202.25GB;;5


I am not blaming the check I assume I am thinking of this incorrectly but I believe, given the values above, that -c 10 should return a critical value and -c 5 should return an OK value. I however get the opposite...

Can anyone shed any light? I looked through many forums and didn't find the same problem. Also using or not using the percent sign makes no difference as well.

Plugin Version: 0.7.1
Nagios XI 5.5.1
CentOS 6.8
VMware 6.5
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_esx3 vfms warning and critical values

Post by ssax »

The reason why is because you are passing in -c 10% in the first command which makes the plugin output based on free space percent, look at the perfdata:

Code: Select all

Prod-VMs-Data-Drives=6.59%;;10
So 10 is less than 6.59 so it's OK, this is proper.

The second one is working based off of free GB left (since you did not pass a percent symbol in the critical threshold:
- See the perfdata changed from percent to GB free

Code: Select all

Prod-VMs-Data-Drives=202.25GB;;5
So 202.25 is larger than 5 so it's CRITCAL, this is proper.

Try this:

Code: Select all

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5:

See here for more info:

http://nagiosplug.sourceforge.net/devel ... HOLDFORMAT
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: Check_esx3 vfms warning and critical values

Post by ahoward12 »

ssax wrote:The reason why is because you are passing in -c 10% in the first command which makes the plugin output based on free space percent, look at the perfdata:

Code: Select all

Prod-VMs-Data-Drives=6.59%;;10
So 10 is less than 6.59 so it's OK, this is proper.
I don't understand what your're trying to say. 10 is not less than 6.59...I am just trying to get a warning if it less 10% free and a critical if its less than 5% free.

So without confusing myself between using and not using the % sign. See below:

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5%
CHECK_ESX3.PL CRITICAL - Storages : 'Prod-VMs-Data-Drives'(free)=279.73 GB (9.11%) | Prod-VMs-Data-Drives=9.11%;;5

There is 9.11% free and I am specifying -c 5%. There is clearly more than 5% free yet I am still getting a critical.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Check_esx3 vfms warning and critical values

Post by npolovenko »

@ahoward12, Please try running the plugin like this:
"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5%:
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: Check_esx3 vfms warning and critical values

Post by ahoward12 »

Appreciate all of the help with this but that does not work either...Output below:

Code: Select all

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5% 
CHECK_ESX3.PL CRITICAL - Storages : 'Prod-VMs-Data-Drives'(free)=627.20 GB (20.42%) | Prod-VMs-Data-Drives=20.42%;;5
Again I could be thinking of this wrong, but that says I have 20% free, and it is coming back as critical.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Check_esx3 vfms warning and critical values

Post by npolovenko »

@ahoward12, I looked at the command you ran but I don't see a colon sign after 5% in your command:
"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5%:
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: Check_esx3 vfms warning and critical values

Post by ahoward12 »

I apologize, I did not run it with a colon because I did not see it either. The output is correct. I have posted the results below so others can see as well. Thanks for the help! -c 5%:

"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 5%:
CHECK_ESX3.PL OK - Storages : 'Prod-VMs-Data-Drives'(free)=642.24 GB (20.91%) | Prod-VMs-Data-Drives=20.91%;;5:



"/usr/local/nagiosxi/etc/components/vmware/cafaroesx73_cafaroco_com_auth.txt" -l "VMFS" -s Prod-VMs-Data-Drives -c 30%:
CHECK_ESX3.PL CRITICAL - Storages : 'Prod-VMs-Data-Drives'(free)=642.24 GB (20.91%) | Prod-VMs-Data-Drives=20.91%;;30:


Thread can be closed!
Locked