<br><br><div class="gmail_quote">On Thu, Jun 30, 2011 at 11:13 PM, T.K.Thapa <span dir="ltr"><<a href="mailto: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="gmail_quote">
<table border="0" cellspacing="0" cellpadding="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="gI">define command{<br>        command_name    check_http2</span></div><div><span class="gI">        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$ $ARG2$<br>        }</span></div><div>
<span class="gI"></span> </div><div><span class="gI">And change the check_command within your host.cfg to:</span></div><div><span class="gI"></span> </div><div><span class="gI">        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="gI"></span></div></div><div><span class="gI">Experiment with that a bit.</span></div><div><span class="gI"></span> </div><div><span class="gI">-Mike</span></div>