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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
thrivikramr
Posts: 27
Joined: Thu Jan 24, 2013 9:02 am

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

Post 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.
Thanks,
ThriVikram
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
thrivikramr
Posts: 27
Joined: Thu Jan 24, 2013 9:02 am

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

Post 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.
Thanks,
ThriVikram
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
thrivikramr
Posts: 27
Joined: Thu Jan 24, 2013 9:02 am

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

Post 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.
Thanks,
ThriVikram
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
thrivikramr
Posts: 27
Joined: Thu Jan 24, 2013 9:02 am

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

Post 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;
You do not have the required permissions to view the files attached to this post.
Thanks,
ThriVikram
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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'
Be sure to check out our Knowledgebase for helpful articles and solutions!
naveenreddyv
Posts: 18
Joined: Wed Jan 16, 2013 6:25 am

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

Post by naveenreddyv »

Issue resolved after changing the $ARG4$ variable.
thank you for the support.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

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

Post by cmerchant »

Great! Glad your problem was resolved. We'll go ahead and close this thread. Thanks.
Locked