Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out how to get Nagios to monitor a few sites that are using HTTPS and require a username/password to log in - I can't figure out how it should be done so I can set a username and password for each host, and then define a service to do the check using those usernames and passwords.

I can write a little perl script that will use wget and return an appropriate exit code, but I can't figure out how to get the username/password/URL to the script when it is called.

share|improve this question
up vote 3 down vote accepted

You should be able to do that with the check_http plugin

-S - SSL
-a "<username>:<password>" - Auth

So your command defination should look something like

define command {
    command_name check_https_auth
    command_line $USER1$/check_http -H $ARG1$ -I $IPADDRESS$ -S -a "$ARG2$:$ARG3$"

Then in your service definition use

check_command check_https_auth!<vhost name>!<username>!<password>
share|improve this answer
When I add the -S option I get "check_http: Invalid option - SSL is not available" openssl is installed. – DrStalker Dec 10 '09 at 7:16
You have to install the package "openssl" Then it is working! apt-get install openssl – Fake4d May 31 '11 at 5:35

Is your site using basic authentication ? If not, have a look at the WebInject plugin - this works with different types of authentication.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.