<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Nagios-users] check_nt and "Connection refused by host"</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Thomas.Schweikle@fiducia.de wrote:</FONT>
<BR><FONT SIZE=2>> Hi!</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I am trying to check if the terminal services are running on a</FONT>
<BR><FONT SIZE=2>> Windows 2000 sever. I am using the command: </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> /usr/lib/nagios/plugins/check_nt -H xcnlm04s.fag.fiducia.de -p 1248</FONT>
<BR><FONT SIZE=2>> -v SERVICESTATE -d SHOWALL -l TermService Connection refused by host </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> But this is answered with "Connection refused". What do I have to do</FONT>
<BR><FONT SIZE=2>> to make it work? </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
</P>

<P><FONT SIZE=2>Presuming you are using NS client, I would setup a checkcommand as follows :</FONT>
<BR><FONT SIZE=2># 'check_nt_service' command definition</FONT>
<BR><FONT SIZE=2>define command{</FONT>
<BR>        <FONT SIZE=2>command_name    check_nt_service</FONT>
<BR>        <FONT SIZE=2>command_line            $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v SERVICESTATE -l $ARG1$</FONT>
<BR>        <FONT SIZE=2>}</FONT>
</P>

<P><FONT SIZE=2>Then you service check would be something like this:</FONT>
<BR><FONT SIZE=2># Service definition for Terminal Service Check</FONT>
<BR><FONT SIZE=2>define service{</FONT>
<BR><FONT SIZE=2>        use                             generic-service         ; Name of service template to use</FONT>
</P>

<P><FONT SIZE=2>        host_name                   host1</FONT>
<BR><FONT SIZE=2>        service_description             Terminal Service</FONT>
<BR><FONT SIZE=2>        is_volatile                     0</FONT>
<BR><FONT SIZE=2>        check_period                    24x7</FONT>
<BR><FONT SIZE=2>        max_check_attempts              3</FONT>
<BR><FONT SIZE=2>        normal_check_interval           5</FONT>
<BR><FONT SIZE=2>        retry_check_interval            1</FONT>
<BR><FONT SIZE=2>        contact_groups                  nt-admins</FONT>
<BR><FONT SIZE=2>        notification_interval           120</FONT>
<BR><FONT SIZE=2>        notification_period             24x7</FONT>
<BR><FONT SIZE=2>        notification_options            w,u,c</FONT>
<BR><FONT SIZE=2>        check_command                   check_nt_service!TermService</FONT>
<BR><FONT SIZE=2>        }</FONT>
<BR><FONT SIZE=2>*****     The information in this email may contain confidential health information that is legally privileged.  This information is intended for the use of the individual or entity named above.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of this email is strictly prohibited.  If you have received this information in error, please notify the sender immediately and arrange for the return or destruction of this information.     *****</FONT></P>

</BODY>
</HTML>