I am new to Check MK Infrastructure & Application Monitoring and running check-mk-raw-2.0.0p4-el8-38.x86_64 on CentOS Linux release 8.3.2011. Is there a way to check if the login is working on a website using Check MK?
For example:- https://developerportal.mydomain.com/login using the below login credentials if the login is successful. If login fails then Check MK will trigger an alert saying login failure.
It is relatively easy if you website uses basic auth over HTTP/S.
If the login are form fields it gets a little bit complicated.
For the first one you can use the classic “check_http” and for the second one you can try the “Check HTML Form Submit”
All more complicated web pages can be checked with the help of tools like robot framework and the integration into CMK by @simonm you can find this integration here. https://www.simon-meggle.de/robotmk/
OMD[checkmk]:/opt/omd/versions/2.0.0p4.cre/lib/nagios/plugins$./check_http -a "devops@mydomain.com:xxxxxxxxxx" develop.mydomain.com
HTTP OK: HTTP/1.0 301 Moved Permanently - 437 bytes in 0.018 second response time |time=0.018391s;;;0.000000;10.000000 size=437B;;;0
OMD[checkmk]:/opt/omd/versions/2.0.0p4.cre/lib/nagios/plugins$./check_http -a “ops@mydomain.com:xxxxxxxxxx” develop.mydomain.com
HTTP OK: HTTP/1.0 301 Moved Permanently - 437 bytes in 0.024 second response time |time=0.024078s;;;0.000000;10.000000 size=437B;;;0
I tested it using the wrong email id and password, I see the same result. Ideally, it should return Unauthenticated. Am I missing anything?
The webserver returns a redirect to a login page as I assumed. It does not use HTTP Basic Auth.
You need to have a look at the code of the login page. If it uses a simple HTML form (and not some JavaScript) you may be successful by posting the form data with check_http but otherwise you are out of look with this simple tool. You will then need to go the End2End-Monitoring route with e.g. RobotMK.
I use devops@mydomain.com:test@1234 to log in to https://develop.mydomain.com/user/login. It works without issue. If I use the wrong password it will report an Unrecognized username or password. Forgot your password? I am attaching the screenshot for your reference.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.