<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hello Michael,<br><br>My bad luck..<br><br>Still not working as per my expectation.<br><br>I tried below combination but no luck.<br><br>define command{<br>        command_name    check_http2<br>        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$ $ARG2$<br>        }<br><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 -t 7'!-r
 ^TAPAN$!<br>        register                        1<br>        }<br><br>second service check---<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>Please suggest if you have something else in your mind.<br><br>Regards<br>Tapan Thapa<br>tapan.thapa@yahoo.com<br><br>--- On <b>Sat, 2/7/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: Saturday, 2 July, 2011, 10:42 AM<br><br><div id="yiv1696750918"><br><br><div class="yiv1696750918gmail_quote">On Thu, Jun 30, 2011 at 11:13 PM, 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:<br><blockquote style="margin:0px 0px 0px
 0.8ex;padding-left:1ex;border-left-color:rgb(204, 204, 204);border-left-width:1px;border-left-style:solid;" class="yiv1696750918gmail_quote">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;font-size-adjust:inherit;font-stretch:inherit;" valign="top">        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="color:rgb(255, 0, 0);font-weight:bold;">TAPAN</span> however response which is coming from url is <span style="color:rgb(0, 0, 127);font-weight:bold;">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</td></tr></tbody></table></blockquote><div>
 </div><div> </div><div>The difference is in your config file, your regex is enclosed in single quotes, which would prevent it from expanding.</div><div> </div><div>Perhaps try modifying your commands.cfg entry to:</div><div>
 </div><div><span class="yiv1696750918gI">define command{<br>        command_name    check_http2</span></div><div><span class="yiv1696750918gI">        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$ $ARG2$<br>        }</span></div><div>
<span class="yiv1696750918gI"></span> </div><div><span class="yiv1696750918gI">And change the check_command within your host.cfg to:</span></div><div><span class="yiv1696750918gI"></span> </div><div><span class="yiv1696750918gI">        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>
</span><span class="yiv1696750918gI"></span></div></div><div><span class="yiv1696750918gI">Experiment with that a bit.</span></div><div><span class="yiv1696750918gI"></span> </div><div><span class="yiv1696750918gI">-Mike</span></div>
</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>