WMI Query
Gaston_Perez at itginc.com
Gaston_Perez at itginc.com
Wed Oct 5 21:50:01 CEST 2005
Hi All I am pretty new to Linux / Nagios and I am running Nagios 1.2, on a
Redhat 9 server. I have Nagios plugins 1.42 installed on my server and on
my windows 2003 servers I have nc_net 2.28. I am trying to run wmi queries
to check the physical hard drive to report back to me if one fails. Here
is what I have in my checkcommands
# 'WMI Harddrive check' command definition
define command{
command_name check_nt_wmihdd
command_line $USER1$check_nt -H $HOSTADDRESS$ -v WMICHECK -l
"cimv2/win32_logicaldrive"
}
I have also tried this
command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$
-v WMICHECK -l "cimv2^select name,freespace,deviceid,status from
win32_DiskDrive"
}
And this
command_line $USER$/check_nt -H $HOSTADDRESS$ -v WMICHECK -l
"cimv2^select DeviceID,Status from win32_DiskDrive"
}
Here is my services command
define service{
use check-nt-service
register 1
host_name server1
service_description WMI HDD
check_command check_nt_wmihdd
max_check_attempts 3
normal_check_interval 5
retry_check_interval 3
check_period 24x7
notification_interval 120
notification_period workhours
notification_options w,c,r
contact_groups prodsupp
}
Response I have seen from the server is
(Return code of 127 is out of bounds - plugin may be missing)
Nagios Log displays this
[1128541333] Warning: Return code of 127 for check of service 'WMI HDD' on
host 'rad-db01' was out of bounds. Make sure the plugin you're trying to
run actually exists.
When I ran the first check command statement above this is the output to
the Nagios log
rad-db01;WMI HDD;CRITICAL;HARD;3;(Return code of 127 is out of bounds -
plugin may be missing)
Now I checked my nc_net plugin and it is the version (2.28) that can read
wmi checks. I also verified that the Nagios plugins I am using (1.42)can
understand wmi checks. Any help at all would be greatly appreciated,
Thanks in Advance
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
This message is for the named person's use only. This communication is for
informational purposes only and has been obtained from sources believed to
be reliable, but it is not necessarily complete and its accuracy cannot be
guaranteed. It is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation of any
transaction. Moreover, this material should not be construed to contain any
recommendation regarding, or opinion concerning, any security. It may
contain confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender. You must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. Any views expressed in this message are those of the individual
sender, except where the message states otherwise and the sender is
authorized to state them to be the views of any such entity.
ITG Inc. and/or its affiliates reserves the right to monitor and archive
all electronic communications through its network.
ITG Inc. Member NASD, SIPC
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051005/c5adcbbb/attachment.html>
More information about the Users
mailing list