<div>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">Hi James Moseley</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"> </font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>Thanks For your valuable reply for my request. I got the port based check_http monitoring. Thanks.</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"> </font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">My command definition as follows,</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"> </font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"># 'check_http' command definition</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman">define command{</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>command_name<span> </span>check_http</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>command_line<span> </span>$USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>}</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"> </font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman">define host{</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>use<span> </span><span> </span><span> </span>linux-server</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>host_name<span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>alias<span> </span><span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>address<span> </span><span> </span><a href="http://saas-test1.com/" target="_blank">saas-test1.com</a></font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>}</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman">define service{</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>use<span> </span><span> </span><span> </span><span> </span>generic-service</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>host_name<span> </span><span> </span><span> </span><span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>service_description<span> </span>HTTP</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_command<span> </span><span> </span>check_http!8082</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_interval<span> </span><span> </span>3</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_period<span> </span><span> </span>24x7</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>retry_interval<span> </span><span> </span>2</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>max_check_attempts<span> </span>2</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_interval<span> </span>5</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_period<span> </span>workhours</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_options<span> </span>w,c,u,r</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notifications_enabled<span> </span>1</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>}</font></font></p></div>
<div> </div>
<div> </div>
<div>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">Regards</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">B.Rajeshkumar</font></p><br>On Mon, Jan 10, 2011 at 10:03 PM, James Moseley <span dir="ltr"><<a href="mailto:jmoseley@corp.xanadoo.com" target="_blank">jmoseley@corp.xanadoo.com</a>></span> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>On Mon, Jan 10, 2011 at 8:33 AM, Rajesh Kumar <span dir="ltr"><<a href="mailto:ras.kumar01@gmail.com" target="_blank">ras.kumar01@gmail.com</a>></span> wrote:<br></div>
<div>
<div></div>
<div>
<div class="gmail_quote">
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">Hi All</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><span><font size="3" face="Times New Roman"> </font></span></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>I have installed Nagios Core in my CentOS but not able to configure port based check_http. We are using several port in apache-tomcat in remote server. We can able to configure default port 80. I have to need to configure server port of 8082, 8084 …<span> </span>could you assist me port based configure on nagios. This is my cfg <span> </span>file of check_http.</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"> </font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">define host{</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>use<span> </span>linux-server</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>host_name<span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>alias<span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>address<span> </span><a href="http://saas-testing.com/" target="_blank">saas-testing.com</a></font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>}</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3" face="Times New Roman">define service{</font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>use<span> </span>generic-service</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>host_name<span> </span>USSERVER</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>service_description<span> </span>HTTP</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_command<span> </span>check_http</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_interval<span> </span>3</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>check_period<span> </span><span> </span>24x7</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>retry_interval<span> </span>2</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>max_check_attempts<span> </span>2</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_interval<span> </span>5</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_period<span> </span>workhours</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notification_options<span> </span>w,c,u,r</font></font></p>
<p style="MARGIN: 0in 0in 0pt" class="MsoNormal"><font size="3"><font face="Times New Roman"><span> </span>notifications_enabled<span> </span>1</font></font></p>
<div><span style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt"><span> </span>}</span></div>
<div><span style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt"></span> </div>
<div><span style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt">Regards</span></div>
<div><span style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt"></span> </div>
<div><span style="FONT-FAMILY: 'Times New Roman'; FONT-SIZE: 12pt">B.Rajeshkumar</span></div></blockquote></div><br></div></div>Your check command definition (which you didn't attach) should look something like:<br>
<br>define command{<br> command_name check_http<br> command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$<br> }<br><br>Then the check_command argument in your service definition, if you were checking port 80, would look like:<br>
<br><font size="3"><font face="Times New Roman">check_command<span> </span>check_http!80<br><br>If you want to check other ports, then you'll have to create a different service for each port you want to check.<br>
</font></font><br>-- <br><font color="#888888">James Moseley<br><br></font><br>------------------------------------------------------------------------------<br>Gaining the trust of online customers is vital for the success of any company<br>
that requires sensitive data to be transmitted over the Web. Learn how to<br>best implement a security strategy that keeps consumers' information secure<br>and instills the confidence they need to proceed with transactions.<br>
<a href="http://p.sf.net/sfu/oracle-sfdevnl" target="_blank">http://p.sf.net/sfu/oracle-sfdevnl</a> <br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">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>