[Nagiosplug-help] http_check plugin query

Michael Saldivar mike.saldivar at advocatecreditrepair.com
Thu Jun 30 17:08:22 CEST 2011


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

YourHostNameHere.cfg:

define service{
        use                     generic-service
        host_name               YourHostNameHere
        service_description     YourNameForThisSiteHere
        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'
        }


-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20110630/9966a494/attachment.html>


More information about the Help mailing list