I have a Shinken setup which tests 2 domains that are behind an HTTP authentication. To do so, I use the following custom macro:
define command {
command_name new_check_http
command_line /opt/shinken/libexec/check_http $ARG1$ --warning $ARG2$ --critical $ARG3$
}
The command is called like this
check_command new_check_http!-I my_host -H my_website -p 80 -a "http_user:http_password"!10!30
When I try /opt/shinken/libexec/check_http -I my_host -H my_website -p 80 -a "http_user:http_password --warning 10 --critical 30
, I get a 302, like I should. However, Shinken keeps reporting 401 every hour. What could be the problem? How can I see what is actually being done?
I think this might be an issue with spaces and the quotes. Try to separate it with more variables, for example:
Or even better, use custom variables:
Then, in your host definition: