<!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 6.5.7654.12">
<TITLE>problem with newly created checkcommand and service</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi there --<BR>
<BR>
I am going through the motions of adding a new checkcommand, and service to the Nagios server. The command involves </FONT>

<BR><FONT SIZE=2 FACE="Arial">the check_mssql_health plugin which runs on the Nagios server. The plugin gets in information via queries to a particular </FONT></P>

<P><FONT SIZE=2 FACE="Arial">port on the Microsoft SQL server. Here are its particulars: </FONT>
</P>

<P><B><FONT SIZE=2 FACE="Arial">/usr/local/nagios/libexec/check_mssql_health --server=<database server> --username=<username> --password=<password> --port=<port> --mode=connection-time</FONT></B> </P>

<P><FONT SIZE=2 FACE="Arial">The name of the checkcommand is:</FONT><B> <FONT SIZE=2 FACE="Arial">database_connection-time<BR>
</FONT></B><BR>
<FONT SIZE=2 FACE="Arial">Once the checkcommand was created, so was the service. The configuration of the service in question, taken from the </FONT>

<BR><FONT SIZE=2 FACE="Arial">services.cfg file, is shown below:<BR>
<BR>
define service {<BR>
service_description                     Database Connection Time<BR>
check_command                   database_connection-time!<BR>
host_name                               <database server><BR>
check_period                            24x7<BR>
contact_groups                          nt-admins,linux-admins,admins<BR>
event_handler_enabled                   0<BR>
active_checks_enabled                   1<BR>
passive_checks_enabled          0<BR>
notifications_enabled                   1<BR>
check_freshness                         0<BR>
freshness_threshold                     86400<BR>
use                                     generic-service<BR>
}<BR>
<BR>
To verify the new configuration would work, the command:</FONT> 
</P>

<P><B><FONT SIZE=2 FACE="Arial">/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</FONT></B><BR>
<BR>
<FONT SIZE=2 FACE="Arial">was run to verify the configuration. It was here the error message: </FONT>
</P>
<UL>
<P><B><FONT SIZE=2 FACE="Arial">Checking services...<BR>
Error: Service check command '<database>_connection-time' specified in service 'Database Connection Time' for host '<database server>' not defined anywhere!</FONT></B></P>
</UL>
<P><FONT SIZE=2 FACE="Arial">I verified the syntax of the command in the checkcommands.cfg file, including the name given to the command. Why would Nagios </FONT></P>

<P><FONT SIZE=2 FACE="Arial">think the service check command is not defined, and return this error? </FONT>
</P>
<BR>
<BR>

<font face="monospace"><br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
http://www.partners.org/complianceline . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</font></BODY>
</HTML>