HTTP WARNING: HTTP/1.1 401 Authorization Required

Richard Solid richardsolid at gmail.com
Mon May 21 22:13:09 CEST 2007


This is what I have on my commands.cfg

# 'check_http_401' command definition
define command{
        command_name    check_http_401
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -e $ARG1$
        }


And this is what I have on my services.cfg:

define service{
        use                             basic-service
        name                            http_401-service
        notification_options            c,r
        check_command                   check_http!401
        register                        0
        }

define service{
        use                             http_401-service
        service_description             HTTP 401
        contact_groups                  admins
        host_name                       hostname.domain.tld
        }

I restarted Nagios with these changes and no issues but the Nagios interface
is still reporting for hostname hostname.domain.tld:

HTTP WARNING: HTTP/1.1 401 Authorization Required

Any inputs?



On 5/21/07, Hugo van der Kooij <hvdkooij at vanderkooij.org> wrote:
>
> On Mon, 21 May 2007, Josh Yost wrote:
>
> > Richard Solid wrote:
> >> Per your suggestion I'm trying to suppres the message "HTTP WARNING:
> >> HTTP/1.1 401 Authorization Required" with the syntax check_http -e 401
> >>
> >> The following is how I defined the service inside services.cfg.
> >>
> >> Is this correct ? I did this and I'm having configuration errors when
> >> starting the nagios service.
> >>
> >> define service{
> >>        use                             basic-service
> >>        name                            http-service
> >>        notification_options            c,r
> >>        check_command                   check_http -e 401
> >>        register                        0
> >>        }
> >>
> >> define service{
> >>        use                             http-service
> >>        service_description             HTTP
> >>        contact_groups                  admins
> >>        host_name                      domainname.tld
> >>        }
> >
> > arguments in the check_command are separated by a '!':
> >   check_command       check_http!401
> >
> > You would use the -e flag in your actual command definition:
> >   command_line                check_http -e $ARG1$ ....
>
> I would define a new check command with the extra option and name it
> check_http_401 for example.
>
> I always prefer to leave the examples as they are. If you redefine them
> you will be bitten later.
>
> Then the rest would be rather obvious.
>
> Much like:
>
> define command {
>          command_name    check_http_url
>          command_line    $USER1$/check_http -H $ARG1$ -u $ARG2$
>          }
>
> define command {
>          command_name    check_https_url
>          command_line    $USER1$/check_http -H $ARG1$ -S -u $ARG2$
>          }
>
> define command {
>          command_name    check_https_cert
>          command_line    $USER1$/check_http -H $ARG1$ -S -C $ARG2$
>          }
>
>
> Hugo.
>
> --
>         hvdkooij at vanderkooij.org        http://hugo.vanderkooij.org/
>             This message is using 100% recycled electrons.
>
>         Some men see computers as they are and say "Windows"
>         I use computers with Linux and say "Why Windows?"
>                 (Thanks JFK, for the insight.)
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070521/7034e21e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list