<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hello Michael,<br><br>Thanks for your help.<br><br>Nagios is able to monitor my url however if i change the response message in my url then nagios do not generate any warning or error.<br><br>My settings are as per your suggestion.<br><br>Command:<br>define command{<br> command_name check_http2<br> command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$<br> }<br><br>Service:<br>define service{<br> use generic-service ; Name of service template to
use<br> host_name jvnag<br> service_description [INDIA] MMPPlus Sync URL Check<br> is_volatile 0<br> check_period 24x7<br> max_check_attempts 3<br>
normal_check_interval 5<br> retry_check_interval 1<br> contact_groups mvas-admins,india-support,mma-PM<br> notification_interval 20<br> notification_period 24x7<br> notification_options w,u,c,r,f<br> check_command check_http2!172.22.65.51!'-u
/MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428 -w 3 -c 5 -r ^TAPAN$ -t 7'<br> register 1<br> }<br><br>Current message which should be checked by above service is <span style="font-weight: bold; color: rgb(255, 0, 0);">TAPAN</span> however response which is coming from url is <span style="font-weight: bold; color: rgb(0, 0, 127);">TAPAN_1</span>. It should thorough some error or waring in nagios.<br><br>If i am firing below mentioned command in command line then it is working as expected.<br><br>Command:<br>./check_http -H 172.22.65.51 -p 80 -u
"/MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428" -w 3 -c 5 -r ^TAPAN$ -t 7<br>Response:<br>HTTP CRITICAL - pattern not found|time=0.072334s;3.000000;5.000000;0.000000 size=174B;;;0<br><br>Why it is not working in nagios, i have no idea. Please suggest.<br><br>Regards<br>Tapan Thapa<br><br>--- On <b>Thu, 30/6/11, Michael Saldivar <i><mike.saldivar@advocatecreditrepair.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael Saldivar <mike.saldivar@advocatecreditrepair.com><br>Subject: Re: [Nagiosplug-help] http_check plugin query<br>To: "Nagios Plugin Help List" <nagiosplug-help@lists.sourceforge.net><br>Date: Thursday, 30 June, 2011, 8:38 PM<br><br><div id="yiv1927191443"><br><br><div class="yiv1927191443gmail_quote">On Thu, Jun 30, 2011 at 12:50 AM, T.K.Thapa
<span dir="ltr"><<a rel="nofollow" ymailto="mailto:tapan.thapa@yahoo.com" target="_blank" href="/mc/compose?to=tapan.thapa@yahoo.com">tapan.thapa@yahoo.com</a>></span> wrote:<blockquote class="yiv1927191443gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">Query:<br>./check_http -H 172.22.65.51 -p 80 -u "/MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428" -w 3 -c 5 -s TAPAN -t 7<br>
<br>Response:<br>HTTP OK HTTP/1.1 200 OK - 0.015 second response time |time=0.014855s;3.000000;5.000000;0.000000 size=172B;;;0<br><br>Now i am not able to figure it out, how to configure this in nagios configuration files.<br>
<br>When i am putting -u with parameters, it is not accepted by nagios.<br></td></tr></tbody></table></blockquote></div><br><br>It would be helpful if you included your config files, so we could point out the difference.<br>
<br>Below are what my config files are, modified to do what I think you are trying to do:<br><br>This is the standard check_http command in /usr/local/nagios/etc/objects/commands.cfg :<br><br># 'check_http' command definition<br>
define command{<br> command_name check_http<br> command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$<br> }<br><br>the -I checks by IP, and $ARG1$ accepts everything after the second ! as an argument. So this is what the config check would be:<br>
<br>YourHostNameHere.cfg:<br><br>define service{<br> use generic-service<br> host_name YourHostNameHere<br> service_description YourNameForThisSiteHere<br> check_command check_http!172.22.65.51!'-u /MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428 -w 3 -c 5 -s TAPAN -t 7'<br>
}<br><br><br clear="all">-Mike<br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">------------------------------------------------------------------------------<br>All of the data generated in your IT infrastructure is seriously valuable.<br>Why? It contains a definitive record of application performance, security <br>threats, fraudulent activity, and more. Splunk takes this data and makes <br>sense of it. IT sense. And common sense.<br><a href="http://p.sf.net/sfu/splunk-d2d-c2" target="_blank">http://p.sf.net/sfu/splunk-d2d-c2</a></div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Nagiosplug-help mailing list<br><a ymailto="mailto:Nagiosplug-help@lists.sourceforge.net" href="/mc/compose?to=Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help"
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>::: Please include plugins version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null<br></div></blockquote></td></tr></table>