check confluence login

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

check confluence login

Post 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
kyang

Re: check confluence login

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check confluence login

Post 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
Former Nagios employee
https://www.mcapra.com/
kyang

Re: check confluence login

Post 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.
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: check confluence login

Post 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
kyang

Re: check confluence login

Post by kyang »

Good to hear! May we close this topic or do you have more questions?
Locked