Page 1 of 1

checkvolsize WMI error - Return code of 255 is out of bounds

Posted: Tue Dec 09, 2014 11:11 pm
by thrivikramr
Hi,

I have a windows server monitoring through WMI. I am trying to monitor volumes created on it, using checkvolsize uisng check_wmi_plus.pl and I am able to get response on command line.

But on XI web interface, it is showing me error 'Return code of 255 is out of bounds', not sure what causing the error and rest of the monitoring is working fine using WMI on this box.

Command line response:
COMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H hostname.com -u 'domain/username' -p '*******' -m checkvolsize -a '\?\\Volume\{f4967789-3099-11f3-8768-9abdnhm4m\}' -w '80' -c '95'
OUTPUT: WARNING - [Triggered by _Used%>80] - N:\Log01\ Total=25.00GB, Used=21.58GB (86.3%), Free=3.42GB (13.7%) |'N:\Log01\ Space'=21.58GB; 'N:\Log01\ Utilisation'=86.3%;80;95;

COMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H hostname.com -u 'domain/username' -p '*******' -m checkvolsize -a 'N:\Log01\' -w '80' -c '95'
OUTPUT: WARNING - [Triggered by _Used%>80] - N:\Log01\ Total=25.00GB, Used=21.58GB (86.3%), Free=3.42GB (13.7%) |'N:\Log01\ Space'=21.58GB; 'N:\Log01\ Utilisation'=86.3%;80;95;

XI web interface response: (Return code of 255 is out of bounds)

Any suggestions how to rectify this? Your help in this regard is much appreciated. Thank you in advance.

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Wed Dec 10, 2014 3:41 am
by Box293
When you're running the tests on the command line, are you running them as the user nagios?

Code: Select all

su nagios
/usr/local/nagios/libexec/check_wmi_plus.pl -H hostname.com -u 'domain/username' -p '*******' -m checkvolsize -a '\?\\Volume\{f4967789-3099-11f3-8768-9abdnhm4m\}' -w '80' -c '95'
This is the account the monitoring engine uses.

Also keep in mind that some of these wmi checks create temporary files (in /tmp/ I think). If you tested as the user root then the root user created the file and the nagios user might not have the ability to update it. If this is the case delete the file and then test again as the nagios user.

Does this help?

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Wed Dec 10, 2014 3:57 am
by thrivikramr
I am running this as nagios user and as per the suggestion, checked /tmp for instances. But I didnot find any issues. I have cross checked plugin permissions also for nagios user. Everything seems to be fine.

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Wed Dec 10, 2014 5:57 pm
by abrist
First, are you just running a "test" from the XI cli, or are you saving the check, applying config, and then checking the normally scheduled result?
Next, do you have any illegal/non-standard meta characters in your password? ($, `, ^, !, etc)

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Thu Dec 11, 2014 12:25 am
by thrivikramr
I have added a new service, saved it and applied config to Sync and then checking the normally scheduled result.
Result: (Return code of 255 is out of bounds)

No meta characters involved in my password.

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Thu Dec 11, 2014 3:48 pm
by tgriep
Could you post your service check that you created for this so we can review it?

I ran a test on my XI server and I didn't get the error you are seeing.

Thanks.

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Thu Dec 11, 2014 8:35 pm
by thrivikramr
Here is my exact service check definition for your reference :- We are using Nagios XI 2014R1.3 hosted on CentOS-6X

Code: Select all

define service {
        host_name                       host-name.domain.com
        service_description             PROD05 Log01 Volume Usage
        use                             xiwizard_windowswmi_service
        check_command                   check_xi_service_wmiplus!'domain/zx_ubcer'!'LibWr007'!checkvolsize!-a 'N:\Log01\' -w '80' -c '95'!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           0
        notification_period             xi_timeperiod_24x7
        _xiwizard                       windowswmi
        register                        1
        }
XI test Output:
COMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H host-name.domain.com -u ''domain/zx_ubcer' -p 'LibWr007' -m checkvolsize -a 'N:\\Log01\\' -w '80' -c '95' -t 60
OUTPUT: WARNING - [Triggered by _Used%>80] - N:\Log01\ Total=25.00GB, Used=22.27GB (89.1%), Free=2.74GB (10.9%) |'N:\Log01\ Space'=22.27GB; 'N:\Log01\ Utilisation'=89.1%;80;95;

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Fri Dec 12, 2014 10:33 am
by tgriep
In your settings for the volume name, you are missing a couple of the back slashes

Change the $ARG4$ variable to

Code: Select all

-a 'N:\\Log01\\' -w '80' -c '95'

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Mon Dec 15, 2014 2:29 am
by naveenreddyv
Issue resolved after changing the $ARG4$ variable.
thank you for the support.

Re: checkvolsize WMI error - Return code of 255 is out of bo

Posted: Mon Dec 15, 2014 10:18 am
by cmerchant
Great! Glad your problem was resolved. We'll go ahead and close this thread. Thanks.