Hello Michael,

Thanks for your help.

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.

My settings are as per your suggestion.

define command{
        command_name    check_http2
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       jvnag
        service_description             [INDIA] MMPPlus Sync URL Check
        is_volatile                             0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval   5
        retry_check_interval    1
        contact_groups                  mvas-admins,india-support,mma-PM
        notification_interval   20
        notification_period             24x7
        notification_options    w,u,c,r,f
        check_command                   check_http2!!'-u /MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428 -w 3 -c 5 -r ^TAPAN$ -t 7'
        register                        1

Current message which should be checked by above service is TAPAN however response which is coming from url is TAPAN_1. It should thorough some error or waring in nagios.

If i am firing below mentioned command in command line then it is working as expected.

./check_http -H -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
HTTP CRITICAL - pattern not found|time=0.072334s;3.000000;5.000000;0.000000 size=174B;;;0

Why it is not working in nagios, i have no idea. Please suggest.

Tapan Thapa

--- On Thu, 30/6/11, Michael Saldivar <mike.saldivar@advocatecreditrepair.com> wrote:

From: Michael Saldivar <mike.saldivar@advocatecreditrepair.com>
Subject: Re: [Nagiosplug-help] http_check plugin query
To: "Nagios Plugin Help List" <nagiosplug-help@lists.sourceforge.net>
Date: Thursday, 30 June, 2011, 8:38 PM

On Thu, Jun 30, 2011 at 12:50 AM, T.K.Thapa <tapan.thapa@yahoo.com> wrote:
./check_http -H -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

HTTP OK HTTP/1.1 200 OK - 0.015 second response time |time=0.014855s;3.000000;5.000000;0.000000 size=172B;;;0

Now i am not able to figure it out, how to configure this in nagios configuration files.

When i am putting -u with parameters, it is not accepted by nagios.

It would be helpful if you included your config files, so we could point out the difference.

Below are what my config files are, modified to do what I think you are trying to do:

This is the standard check_http command in /usr/local/nagios/etc/objects/commands.cfg :

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$

the -I checks by IP, and $ARG1$ accepts everything after the second ! as an argument.  So this is what the config check would be:


define service{
        use                     generic-service
        host_name               YourHostNameHere
        service_description     YourNameForThisSiteHere
        check_command           check_http!!'-u /MMPPlus/RequestReceiverServlet?mobileNo=919200000000&moid=0000&operator=TATA&circle=DELHI&content=TAPAN&shortCode=542428 -w 3 -c 5 -s TAPAN -t 7'


-----Inline Attachment Follows-----

All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.

-----Inline Attachment Follows-----

Nagiosplug-help mailing list
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null