<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<title>Check_nt win2k service states and nagios</title>

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You can define a new check command in your
checkcommand.cfg file such as:</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 'check_nt_service_exchange' command
definition</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>define command{</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>        command_name    check_nt_service</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>        command_line    $USER1$/check_nt
-H $HOSTADDRESS$ -s password123 -v SERVICESTATE -d SHOWALL -l $ARG1$</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>        }</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Then in your services.cfg file modify the
line:</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>check_command "/usr/local/nagios/libexec/check_nt_exchange!SMTPSVC,AVExch32Service</span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I haven’t tested with a comma in the
check_command line, so you may need to either add another $ARG$ or place an
escape character in the command.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Tim Van Zee</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>ITS Network Specialist</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
  10.0pt;font-family:Arial;color:navy'>Governors</span></font><font size=2
 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
 color:navy'> State University</span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
nagios-users-admin@lists.sourceforge.net
[mailto:nagios-users-admin@lists.sourceforge.net] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Neil Lehouillier<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, October 31, 2003
3:02 PM<br>
<b><span style='font-weight:bold'>To:</span></b> nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Nagios-users] Check_nt
win2k service states and nagios</span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi
All,</span></font> </p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I'm
having a problem monitoring some Win 2k exchange services using nagios and
check_nt from nsclient.  When I execute the following from the command
line su'd to nagios(ie...su - nagios) I get the following:</span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>usr/local/nagios/libexec/check_nt
-H 192.168.0.7 -s password123 -v SERVICESTATE -d SHOWALL -l
SMTPSVC,AVExch32Service<br>
<br>
SMTPSVC: Started - AVExch32Service: Started<br>
<br>
But within nagios on the http web page I get:<br>
Service Checks(SMTP,AV)<br>
<br>
WARNING 10-31-2003 09:00:54 0d 0h 6m 11s 1/1 SMTPSVC: Started -
AVExch32Service$: Unknown<br>
<br>
Here is the definition in the services.cfg file:<br>
define service {<br>
host_name Exchange<br>
service_description Service Checks(SMTP,AV)<br>
register 1<br>
max_check_attempts 1<br>
normal_check_interval 3<br>
retry_check_interval 1<br>
check_period 24x7<br>
notification_interval 0<br>
notification_period 24x7<br>
notification_options w,u,c,r<br>
contact_groups ntadmins<br>
check_command "/usr/local/nagios/libexec/check_nt -H 192.168.0.7 -s
password123 -v SERVICESTATE -d SHOWALL -l SMTPSVC,AVExch32Service"<br>
<br>
Has anyone seen this problem before…….?<br>
<br>
<br>
Thanks...<br>
<br>
Neil </span></font></p>

</div>

</body>

</html>