<span style="font-weight: bold;">This is what I have on my commands.cfg</span><br><span style="font-style: italic;"><span style="font-style: italic;"><br></span># 'check_http_401' command definition</span><br style="font-style: italic;">
<span style="font-style: italic;">define command{</span><br style="font-style: italic;"><span style="font-style: italic;">        command_name    check_http_401</span><br style="font-style: italic;"><span style="font-style: italic;">
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -e $ARG1$</span><br style="font-style: italic;"><span style="font-style: italic;">        }</span><br><br><br><span style="font-weight: bold;">And this is what I have on my 
services.cfg:</span><br><span style="font-style: italic;"><span style="font-style: italic;"><br></span>define service{</span><br style="font-style: italic;"><span style="font-style: italic;">        use                             basic-service
</span><br style="font-style: italic;"><span style="font-style: italic;">        name                            http_401-service</span><br style="font-style: italic;"><span style="font-style: italic;">        notification_options            c,r
</span><br style="font-style: italic;"><span style="font-style: italic;">        check_command                   check_http!401</span><br style="font-style: italic;"><span style="font-style: italic;">        register                        0
</span><br style="font-style: italic;"><span style="font-style: italic;">        }</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">define service{</span><br style="font-style: italic;">
<span style="font-style: italic;">        use                             http_401-service</span><br style="font-style: italic;"><span style="font-style: italic;">        service_description             HTTP 401</span><br style="font-style: italic;">
<span style="font-style: italic;">        contact_groups                  admins</span><br style="font-style: italic;"><span style="font-style: italic;">        host_name                       hostname.domain.tld</span><br style="font-style: italic;">
<span style="font-style: italic;">        }</span><br><br>I restarted Nagios with these changes and no issues but the Nagios interface is still reporting for hostname hostname.domain.tld:<br><br>HTTP WARNING: HTTP/1.1 401 Authorization Required 
<br><br>Any inputs?<br><br><br><br><div><span class="gmail_quote">On 5/21/07, <b class="gmail_sendername">Hugo van der Kooij</b> <<a href="mailto:hvdkooij@vanderkooij.org">hvdkooij@vanderkooij.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Mon, 21 May 2007, Josh Yost wrote:<br><br>> Richard Solid wrote:<br>>> Per your suggestion I'm trying to suppres the message "HTTP WARNING:
<br>>> HTTP/1.1 401 Authorization Required" with the syntax check_http -e 401<br>>><br>>> The following is how I defined the service inside services.cfg.<br>>><br>>> Is this correct ? I did this and I'm having configuration errors when
<br>>> starting the nagios service.<br>>><br>>> define service{<br>>>        use                             basic-service<br>>>        name                            http-service<br>>>        notification_options            c,r
<br>>>        check_command                   check_http -e 401<br>>>        register                        0<br>>>        }<br>>><br>>> define service{<br>>>        use                             http-service
<br>>>        service_description             HTTP<br>>>        contact_groups                  admins<br>>>        host_name                      domainname.tld<br>>>        }<br>><br>> arguments in the check_command are separated by a '!':
<br>>   check_command       check_http!401<br>><br>> You would use the -e flag in your actual command definition:<br>>   command_line                check_http -e $ARG1$ ....<br><br>I would define a new check command with the extra option and name it
<br>check_http_401 for example.<br><br>I always prefer to leave the examples as they are. If you redefine them<br>you will be bitten later.<br><br>Then the rest would be rather obvious.<br><br>Much like:<br><br>define command {
<br>         command_name    check_http_url<br>         command_line    $USER1$/check_http -H $ARG1$ -u $ARG2$<br>         }<br><br>define command {<br>         command_name    check_https_url<br>         command_line    $USER1$/check_http -H $ARG1$ -S -u $ARG2$
<br>         }<br><br>define command {<br>         command_name    check_https_cert<br>         command_line    $USER1$/check_http -H $ARG1$ -S -C $ARG2$<br>         }<br><br><br>Hugo.<br><br>--<br>        <a href="mailto:hvdkooij@vanderkooij.org">
hvdkooij@vanderkooij.org</a>        <a href="http://hugo.vanderkooij.org/">http://hugo.vanderkooij.org/</a><br>            This message is using 100% recycled electrons.<br><br>        Some men see computers as they are and say "Windows"
<br>        I use computers with Linux and say "Why Windows?"<br>                (Thanks JFK, for the insight.)<br><br>-------------------------------------------------------------------------<br>This SF.net email is sponsored by DB2 Express
<br>Download DB2 Express C - the FREE version of DB2 express and take<br>control of your XML. No limits. Just data. Click to get it now.<br><a href="http://sourceforge.net/powerbar/db2/">http://sourceforge.net/powerbar/db2/
</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">
https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null
<br></blockquote></div><br>