Check http status with site have authentication basic!

  • I config icinga2 for check site status on localhost --> “intranet.skill20.net” with authentication basic “user:adam;password:Passw0rd$”.

  • List item I use: # curl -u adam:Passw0rd$ intranet.skill20.net
    ----> show content is OK.

10
–> is this complete ? help me!!!

Could you show the service and command definition?

I modify file host.conf:

vim /etc/icinga2/conf.d/hosts.conf


can you help me config it.

Hi,

check the http command docs for available and correct parameters.
You looking for http_auth_pair:

vars.http_vhosts["http"] = {
    http_auth_pair = "username:password"
}

Looks like you are using the parameters for the apache-status check.

Can you show also the service definition as @stevie-sy already mentioned?

Greetz

3 Likes

result :

Hi,

a full output from the error would help here a lot.
The actual error is not on the screenshot (just tested it myself to get the full error).

The password is ending with a $ sign. Icinga2 understands that as an opening macro - so try with the password Passw0rd$$ (note the double $).

Greetz

1 Like

wow. you are wonderful.

the password is ending with a $ sign. Icinga2 understands that as an opening macro - so try with the password Passw0rd$ (note the double $ ).

and: 17

my password is Obligatory : Passw0rd$ ( ending with a $ sign). ---->So what should I fix? I read marco but dont understand. please !!!

Hi,

please extract the full command line for this check. You can find the instructions in the troubleshooting docs.

Cheers,
Michael

2 Likes

If my password is: Passw0rd (not symbol $ ) —> is OK.


but I my password need " $ " behind string " Passw0rd$ " . so, how to do i do?

The docs say you need to mask it with another ‘$’, so you need to configure the password as ‘Passw0rd$$’

2 Likes

thank you very much !!! i love you :smiley: :smiley: . My problem is finish. i received help from every one. thank all !!!

2 Likes