Return code of 139 is out of bounds when checking d on windows


I’m using nagios v. 3.0rc1 and nsclient++ rc and am receiving an error on one of my hosts. When running check_nt!USEDDISKSPACE !-l d -w 80 -c 90 nagios web interface shows "Return code of 139 is out of bounds ". however, the c: drive space shows up correctly.

I’ve tried manually running the commands from the command line:
[nagios@host libexec]$ pwd
[nagios@host libexec]$ ./check_nt -H -p 12489 -s -v USEDDISKSPACE -l c -w 80 -c 90
c:\ - total: 12.00 Gb - used: 7.43 Gb (62%) - free 4.57 Gb (38%) | ‘c:\ Used space’=7.43Gb;9.60;10.80;0.00;12.00
[nagios@host libexec]$ ./check_nt -H -p 12489 -s -v USEDDISKSPACE -l d -w 80 -c 90
d:\ - total: 56.20 Gb - used: 34.26 Gb (61%) - free 21.93 Gb (39%) | ‘d:\ Used Space’=34.26Gb;44.96;50.58;0.00;56.20

both return valid info from what I can see, but when nagios performs the check i am returned the error listed above. Can anyone explain what may be happening? D: is a valid second drive on the system as you can see above.

Thanks for any help you can give,

(Return code of 139 is out of bounds)

Hi Cookal,

Don’t know if you got it figured out yet, but I had the same problem on a win2k3-server. C drive was giving return code of 139 out of bounds, while the other drives were ok.
What did I do then?
I just changed my warning and critical value with +1, so if it was like -w 90 -c95, I changed it to -w 91 -c96
And it works again. You can change it back to the old values, still works.
Hope it works for you!





Restarting the NSclient++ service on the cli


No luck yet. Same error and tried the restart service and changing the values.
4 drives to chec (c,d,e and f) and only c is OK, others with error 139


I’m having exactly the same issue. In my case, it’s the E: drive on one particular server. Works fine across multiple drives on other servers. Nagios reports, “(Return code of 139 is out of bounds)”. Ran check_nt directly, and here’s the result:

[root@esglxit01 libexec]# ./check_nt -H asgw3ex01 -v USEDDISKSPACE -p 12489 -l c -w 90 -c 95
c:\ - total: 19.53 Gb - used: 11.65 Gb (60%) - free 7.88 Gb (40%) | ‘c:\ Used Space’=11.65Gb;17.58;18.56;0.00;19.53

[root@esglxit01 libexec]# ./check_nt -H asgw3ex01 -v USEDDISKSPACE -p 12489 -l e -w 90 -c 95
e:\ - total: 273.45 Gb - used: 259.96 Gb (95%) - free 13.49 Gb (5%) | ‘e:\ Used Space’=259.96Gb;246.11;259.78;0.00;273.45

In the above example, the C: drive reports fine, but the E: reports the out of bounds error. Both are using the same version and config file on NSClient++, and the Nagios config file for that server uses identical settings for C: and E:. I’ve tried shifting the 90% and 95% to 91% and 96%, I’ve uninstalled and reinstalled NSClient++, and still no joy.

Is there a bug submission system for Nagios? Since the result from NSClient++ is basically identical, I’m assuming that the bug is in Nagios or in the plugin.




It seems a bit embarrassing now, but I found the main problem with my server was that in the server’s config file in Nagios, I had set the ip address wrong. The ip was for a server that was running the client, but didn’t have the extra drive, so of course it was returning an error. Once I had figured out the ip address problem, reporting on that drive was fine. I’m not sure how you have your configs set up, Tim, but I have mine divided into separate folders to keep them organized according to their role in our infrastructure and I’m parsing the entire folder, so I accidentally copied the original file without making the necessary IP change in it. Don’t know if t his will help, but I hope it does.


My God, I’m such a moron. I checked and, sure enough, it still had the IP address of the server whose configuration I copied. I changed the IP to the correct one, and it’s working great now. Thanks again; I’ve been tearing my hair out over this.