check_nt diskusage query no status returned
Tim Shouldice
tim at mintoskatingclub.com
Thu Jul 17 19:53:13 CEST 2003
The order of the switches does not actually matter. The text of the output will always be
the same, however the status code returned by the plugin should be 0 for ok, 1 for
warning and 2 for error. To check that it is working, simply create a simple perl wrapper
to see the return code
#!/usr/bin/perl
$ret=system(/usr/local/nagios/check_nt -H somehost -w 80 -c 90 -v USEDDISKSPACE -l C");
print "$ret\n";
You'll see the returned text of the command on one line and the return code on the other.
The return code from Perl needs to be divided by 256. So you'll see 0 for OK, 256 for
WARNING and 512 for CRITICAL.
Tim Shouldice
http://support.tsmgsoftware.com
On Jul 17, "VanZee, Timothy" <T-VANZEE at govst.edu> wrote:
>
> Try changing your -w and -c parameters so that they follow the -v and -l
> parameters. For example, modify your command below to check_nt -H
> 10.0.0.3 -v USEDDISKSPACE -l C -w 20% -c 80%. That is the proper syntax
> according to the documentation.
>
>
> Tim Van Zee
> ITS Network Specialist
> Governors State University
>
> -----Original Message-----
> From: lists at sancho2k.net [mailto:lists at sancho2k.net]
> Sent: Wednesday, July 16, 2003 11:34 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_nt diskusage query no status returned
>
> Hi all,
>
> We came to a sudden and discomforting realization that our disk space
> checks on NT/2000 boxes using check_nt were not returning status levels
> as
> we would expect per the -w and -c switches. Here's our example command:
>
> # check_nt -H 10.0.0.3 -w 20% -c 80% -v USEDDISKSPACE -l C
>
> C:\ - total: 19.10 Gb - used: 13.94 Gb (73%) - free 5.16 Gb (27%)
>
> With the warning threshold we have set here, I would expect the check to
> return a status other than OK on this. Nagios of course displays OK in
> the
> UI even when drive space is sitting at 100% full, 0% free.
>
> We've seen an alternative to this in using SNTP but this is not an
> alternative in our case.
>
> Any suggestions?
>
> TIA,
>
> DS
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: <a
href='http://www.vmware.com/wl/offer/345/0'>http://www.vmware.com/wl/offer/345/0</a>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: <a
href='http://www.vmware.com/wl/offer/345/0'>http://www.vmware.com/wl/offer/345/0</a>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list