Nagios-users digest: check_wins. Please don't post in HTML.
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Oct 28 23:55:14 CET 2003
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.
On Mon, Oct 27, 2003 at 08:14:28PM -0800, nagios-users-request at lists.sourceforge.net wrote:
>
> Message: 9
> From: "Alex St. Amand" <astamand at ati.com>
> To: "'nagios-users at lists.sourceforge.net'"
> <nagios-users at lists.sourceforge.net>
> Date: Mon, 27 Oct 2003 11:38:51 -0500
> Subject: [Nagios-users] check_wins
>
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_001_01C39CA8.CDC4EE60
> Content-Type: text/plain
>
> 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
>
>
> ------_=_NextPart_001_01C39CA8.CDC4EE60
> Content-Type: text/html
> Content-Transfer-Encoding: quoted-printable
>
> <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
> xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
> xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
> xmlns=3D"http://www.w3.org/TR/REC-html40">
>
> <head>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Dus-ascii">
>
>
> <meta name=3DProgId content=3DWord.Document>
> <meta name=3DGenerator content=3D"Microsoft Word 10">
> <meta name=3DOriginator content=3D"Microsoft Word 10">
> <link rel=3DFile-List href=3D"cid:filelist.xml at 01C39C7E.2B3323D0">
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"PostalCode"/>
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"State"/>
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"City"/>
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"place"/>
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"Street"/>
> <o:SmartTagType =
> namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
> name=3D"address"/>
> <!--[if gte mso 9]><xml>
> <o:OfficeDocumentSettings>
> <o:DoNotRelyOnCSS/>
> </o:OfficeDocumentSettings>
> </xml><![endif]--><!--[if gte mso 9]><xml>
> <w:WordDocument>
> <w:SpellingState>Clean</w:SpellingState>
> <w:GrammarState>Clean</w:GrammarState>
> <w:DocumentKind>DocumentEmail</w:DocumentKind>
> <w:EnvelopeVis/>
> <w:Compatibility>
> <w:BreakWrappedTables/>
> <w:SnapToGridInCell/>
> <w:WrapTextWithPunct/>
> <w:UseAsianBreakRules/>
> </w:Compatibility>
> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
> </w:WordDocument>
> </xml><![endif]--><!--[if !mso]>
> <style>
> st1\:*{behavior:url(#default#ieooui) }
> </style>
> <![endif]-->
> <style>
> <!--
> /* Style Definitions */
> p.MsoNormal, li.MsoNormal, div.MsoNormal
> {mso-style-parent:"";
> margin:0in;
> margin-bottom:.0001pt;
> mso-pagination:widow-orphan;
> font-size:12.0pt;
> font-family:"Times New Roman";
> mso-fareast-font-family:"Times New Roman";}
> a:link, span.MsoHyperlink
> {color:blue;
> text-decoration:underline;
> text-underline:single;}
> a:visited, span.MsoHyperlinkFollowed
> {color:purple;
> text-decoration:underline;
> text-underline:single;}
> span.EmailStyle17
> {mso-style-type:personal-compose;
> mso-style-noshow:yes;
> mso-ansi-font-size:10.0pt;
> mso-bidi-font-size:10.0pt;
> font-family:Arial;
> mso-ascii-font-family:Arial;
> mso-hansi-font-family:Arial;
> mso-bidi-font-family:Arial;
> color:windowtext;}
> span.SpellE
> {mso-style-name:"";
> mso-spl-e:yes;}
> @page Section1
> {size:8.5in 11.0in;
> margin:1.0in 1.25in 1.0in 1.25in;
> mso-header-margin:.5in;
> mso-footer-margin:.5in;
> mso-paper-source:0;}
> div.Section1
> {page:Section1;}
> -->
> </style>
> <!--[if gte mso 10]>
> <style>
> /* Style Definitions */=20
> table.MsoNormalTable
> {mso-style-name:"Table Normal";
> mso-tstyle-rowband-size:0;
> mso-tstyle-colband-size:0;
> mso-style-noshow:yes;
> mso-style-parent:"";
> mso-padding-alt:0in 5.4pt 0in 5.4pt;
> mso-para-margin:0in;
> mso-para-margin-bottom:.0001pt;
> mso-pagination:widow-orphan;
> font-size:10.0pt;
> font-family:"Times New Roman";}
> </style>
> <![endif]-->
> </head>
>
> <body lang=3DEN-US link=3Dblue vlink=3Dpurple =
> style=3D'tab-interval:.5in'>
>
> <div class=3DSection1>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Hello,<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p> </o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Has anyone had any luck with the check_wins plug-in? =
> <span
> style=3D'mso-spacerun:yes'> </span>I can get it to work fine from =
> the command
> line but running it through nagios results in a "no output" and
> critical flag.<span style=3D'mso-spacerun:yes'> </span>I am =
> thinking it is not
> picking up the exit code properly?<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p> </o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'>Thanks for any help.<o:p></o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial'><o:p> </o:p></span></font></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial;mso-no-proof:yes'>Alex St. Amand</span></font><span
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial;mso-no-proof:yes'>Information =
> Technology</span></font><span
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><font size=3D2 color=3Dred face=3DArial><span =
> style=3D'font-size:
> 10.0pt;font-family:Arial;color:red;mso-no-proof:yes'>ATI =
> </span></font><font
> size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:
> yes'>Research, Inc.</span></font><span =
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><st1:Street><st1:address><font size=3D2 =
> face=3DArial><span
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>62 =
> Forest Street</span></font></st1:address></st1:Street><span
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><st1:place><st1:City><font size=3D2 =
> face=3DArial><span
> =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>Marlboroug=
> h</span></font></st1:City><font
> size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:
> yes'>, </span></font><st1:State><font size=3D2 face=3DArial><span
> =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>MA</span><=
> /font></st1:State><font
> size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:
> yes'> </span></font><st1:PostalCode><font size=3D2 face=3DArial><span
> =
> style=3D'font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>01752</spa=
> n></font></st1:PostalCode></st1:place><span
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial;mso-no-proof:yes'><a =
> href=3D"mailto:astamand at ati.com">astamand at ati.com</a></span></font><span=
>
> style=3D'mso-no-proof:yes'><o:p></o:p></span></p>
>
> <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
> style=3D'font-size:10.0pt;
> font-family:Arial;mso-no-proof:yes'>(508) =
> 263-4843</span></font><o:p></o:p></p>
>
> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
> style=3D'font-size:
> 12.0pt'><o:p> </o:p></span></font></p>
>
> </div>
>
> </body>
>
> </html>
>
> ------_=_NextPart_001_01C39CA8.CDC4EE60--
>
It would be better for other list readers for you to ask your mail user
agent - Outlook I guess - to not do this.
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