Page 1 of 1

check confluence login

Posted: Mon Oct 16, 2017 4:31 am
by elinagios
Hello

is it possible to check if user can log in to confluence. I tried with check_basicauth script, but i get an error:
Can't locate LWP/Authen/Oauth.pm in @INC
After that did: cpan LWP::Authen::OAuth with success but the error code remains the same. Is there some other check i can run?
Authentication is against AD.

Regards,
Mirgo

Re: check confluence login

Posted: Mon Oct 16, 2017 11:40 am
by kyang
Is confluence using basic authentication? NTLM?

Here's a previous forum topic using the check_http
https://support.nagios.com/forum/viewto ... 51&start=0

Re: check confluence login

Posted: Mon Oct 16, 2017 12:50 pm
by mcapra
Depending on your server's Confluence configuration, check_http might be usable:

Code: Select all

/usr/local/nagios/libexec/check_http -H confluence.site.com -u '/confluence/dologin.action' -P 'os_username=some_username&os_password=some_password' -s 'log out'
If HTTPS is enforced, add -S. Also be aware of any special characters you are passing as POST variables for the username/password; They will need to be URL encoded.

I have my command set to look for "log out" on the resulting page since "log out" shouldn't appear on a page that isn't logged in.

More info on check_http usage:
https://nagios-plugins.org/doc/man/check_http.html

Re: check confluence login

Posted: Mon Oct 16, 2017 12:52 pm
by kyang
Thanks for the example @mcapra!

Was working on getting this example, but glad you helped out.

@elinagios, try this out and hope it helps.

Re: check confluence login

Posted: Tue Oct 17, 2017 1:17 am
by elinagios
Hello

thank you guys, especially mcapra, the example you gave works like a charm. For me i needed to add -S as https was forced.

Mirgo

Re: check confluence login

Posted: Tue Oct 17, 2017 9:05 am
by kyang
Good to hear! May we close this topic or do you have more questions?