Nagios-users digest: check_wins. Please don't post in HTML.
Alex St. Amand
astamand at ati.com
Wed Oct 29 15:26:50 CET 2003
Thank you. I had not tried it at the CLI as the nagios user only as root.
The problem was that the path in the plug-in contained the word netsaint
instead of nagios for the common lib path. Fixing that fixed the problem
-Alex
-----Original Message-----
From: Stanley Hopcroft [mailto:Stanley.Hopcroft at ipaustralia.gov.au]
Sent: Tuesday, October 28, 2003 5:55 PM
To: nagios-users at lists.sourceforge.net
Cc: astamand at ati.com
Subject: Re: Nagios-users digest: check_wins. Please don't post in HTML.
Dear Sir,
I am writing to thank you for your letter and say my reply is way way
way down below that ugly HTML your mailer mangled your letter into.
> Hello,
>
> Has anyone had any luck with the check_wins plug-in? I can get it to work
> fine from the command line but running it through nagios results in a "no
> output" and critical flag. I am thinking it is not picking up the exit
code
> properly?
>
> Thanks for any help.
>
> Alex St. Amand
> Information Technology
> ATI Research, Inc.
> 62 Forest Street
> Marlborough, MA 01752
> astamand at ati.com <mailto:astamand at ati.com>
> (508) 263-4843
<UGLY MANGLED HTML MAILER REMOVED>
The main problem that plugins like check_wins encounter is that the
Nagios user cannot access the binaries that a program such as this needs
to operate.
Please note that check_wins is a contrib plugin and therefore requires
explicit path changes to work (core plugins work hard to find the path
to Samba and so on and then edit the source to accordingly in the
configure processe).
This may help
. su nagios (or whatever your Nag user is)
. run the plugin from the CLI
==> works ? some sort of permission problem with the Samba binary
nmblookup (can't imagine what since on this system
tsitc> ls -l /usr/local/samba/bin/nmblookup
-rwxr-xr-x 1 root wheel 516027 Apr 9 2003
/usr/local/samba/bin/nmblookup
tsitc> )
==> doesn't work ?
Please post your
1 plugin version:
(tsitc> /usr/local/nagios/libexec/check_wins -V
check_wins (netsaint-plugins 1.2.9-4) 2.8
The netsaint plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
tsitc> )
2 Samba nmblookup version:
tsitc> /usr/local/samba/bin/nmblookup -v
nmblookup: illegal option -- v
Usage: nmblookup [-M] [-B bcast address] [-d debuglevel] name
Version 2.2.8a
FWIW, I have been using check_wins for some years, and I know of at
least one other site that is using it.
3 The definition of check_wins from checkcommand.cfg and how you are
calling it from services.cfg
NB. You __must__ provide the -D and -C parameters
tsitc> /usr/local/nagios/libexec/check_wins -h
check_wins (netsaint-plugins 1.2.9-4) 2.8
The netsaint plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 2001 Karl DeBisschop/S Hopcroft
Perl Check WINS plugin for NetSaint.
Returns OK if the addresses of domain controllers are found in the list
of domain controllers returned in the WINS response to a 'domain
controllers query'
Why would you want to do this ?
MS File server clients insist on connecting to file servers using
NetBIOS names.
If they __don't__ resolve NetBIOS names with a WINS (NBNS) then they'll
either fail to logon and connect to shares or they will
broadcast requsts for names.
Both problems are eliminated by a healthy WINS.
Also, you may have a MS domain spanning a number of WAN connected
sites, with domain controllers far away from powerful local
domain controllers.
In this case, you want your local clients to have their logon requests
validated by the local controllers.
The plugin works by
asking the WINS to resolve the addresses of the domain controllers
(supplied by -C or from the constant MY_DCS)
asking the WINS to return the list of addresses of the domain
controllers able to validate requests for the domain
whose name is given by -D
returning Ok if all controller addresses are in that list (of
addresses of domain controllers) or
returning WARNING if not all the controller addresses are in the
list or
returning CRITICAL if there is no reply from the WINS or the list
contains none of the contoller addresses
Usage: check_wins -W <wins> -D <domain>
-W, --wins=STRING
Hostname or address of the WINS (Either Samba/nmbd or MS product)
-D, --domain=STRING
MS Domain name to find the Domain controllers of.
-C, --controllers:STRING
Optional __name(s)__ of domain controller that __must__ be found in
the response to a domain controller name query.
If not defined, then use the constant value MY_DCS. You must use
either -C or make sure that MY_DCS contains the names
of __your__ domain controllers.
-T, --timeout:INTEGER
-d, --debug
Debugging output.
-h, --help
This stuff.
Send email to netsaint-users at lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest
improvements,
send email to netsaintplug-devel at lists.sourceforge.net
tsitc>
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
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