<font size="2"><font face="Arial">Hi,<br><br>Please show the command definition of database_connection-time.<br><br>Furthermore in the service definition you use the following line:<br><br></font></font><font face="Arial" size="2"><span style="font-family: courier new,monospace;">check_command                   database_connection-time!</span><br>
<br>Didn't you want to pass arguments to the command? If they're already hardcoded in the command definition you can leave the exclamation mark off.<br></font><font face="Arial" size="2"></font><br><div class="gmail_quote">
On Tue, Nov 22, 2011 at 7:29 PM, Kaplan, Andrew H. <span dir="ltr"><<a href="mailto:AHKAPLAN@partners.org">AHKAPLAN@partners.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>






<div>


<p><font face="Arial" size="2">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 face="Arial" size="2">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 face="Arial" size="2">port on the Microsoft SQL server. Here are its particulars: </font>
</p>

<p><b><font face="Arial" size="2">/usr/local/nagios/libexec/check_mssql_health --server=<database server> --username=<username> --password=<password> --port=<port> --mode=connection-time</font></b> </p>


<p><font face="Arial" size="2">The name of the checkcommand is:</font><b> <font face="Arial" size="2">database_connection-time<br>
</font></b><br>
<font face="Arial" size="2">Once the checkcommand was created, so was the service. The configuration of the service in question, taken from the </font>

<br><font face="Arial" size="2">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 face="Arial" size="2">/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg</font></b><br>
<br>
<font face="Arial" size="2">was run to verify the configuration. It was here the error message: </font>
</p>
<ul>
<p><b><font face="Arial" size="2">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 face="Arial" size="2">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 face="Arial" size="2">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>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . 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></div>
<br>------------------------------------------------------------------------------<br>
All the data continuously generated in your IT infrastructure<br>
contains a definitive record of customers, application performance,<br>
security threats, fraudulent activity, and more. Splunk takes this<br>
data and makes sense of it. IT sense. And common sense.<br>
<a href="http://p.sf.net/sfu/splunk-novd2d" target="_blank">http://p.sf.net/sfu/splunk-novd2d</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>