That test will at most check if the port is open. It does not even check for the login screen.
So far I was doing the very same but actually I am hoping for something smarter.
Maybe I should check what can be exposed for Prometheus.
You could look at the code for the Website Checker component to see if you can recycle some of the Python code for your own use. I use this to check on various websites I manage and it actually checks for Code 200/400/etc to know if the site is operating properly or not.
A website is considered OK when an HTTP request returned with a response code < 500. Or the other way around it is considered a problem if the HTTP request failed or returned a response code >= 500.