Monitoring multiple domains (https/tls/ssl certificates) on one host/server?

Hello!

We want to use CheckMK to monitor our (mostly) web servers.
One part of that would be monitoring if websites are up, maybe look for error codes and if the certificates are still valid.

I think I figured out one way on how to do it with CheckMK:

One host that monitors the server itself (with all the services that run on it) and one host per domain that’s only used for monitoring the domain. Guess I’ll create a host group for a better overview of domains-on-server?
It’s not possible to define e.g. 10 domains on a host/server that runs service x against?

So my certification service looks like this:
Setup > Services > HTTP > Check HTTP service.
Hostname: $HOSTNAME$
Mode of the Check: Check SSL Certificate Age and I limit it to Host labels proto:https so it only runs on my domain-hosts and not every host in the folder.

Thanks for any tips :slight_smile:

Helpful articles:
https://blog.checkmk.com/how-to-monitor-webserver
https://docs.checkmk.com/latest/en/active_checks.html

Hi beob

If I understand you correctly, you want to check certificate age for multiple domains that run on the same host?
This may be achieved by creating multiple “Check HTTP service” rules that all apply for the same host.
In each rule you set the “Service name” and “Virtual host” to a unique domain you would like to check.

E.g.

  • the webserver is called webserver-001.provider.intra
  • you have two domains that are served on this server: www.somedomain.com and www.otherdomain.com

The rule for www.somedomain.com could look like this:

The same goes for www.otherdomain.com. You just replace the domain name, of course.
In the end, you will have a list of rules, that all apply to the same webserver but check different domains:

In WATO this will then look something like this (except - it should work at your end :wink: )

I hope this helps :slight_smile:

Kind regards

1 Like

Thank you, looks good!

If I only test this one thing it’s probably a better alternative, then what I described above, it’s also neatly bundled into the server.

But if I want to add lets say 4 default rules for all my domains (e.g. test the response, test for 404 returns, etc.) it gets a bit out of hand to create these 4 rules for each Domain manually.

Instead if I create these 4 rules that apply to all servers with a certain label (my “domain/webservers”), I “only” have to create the Domain/Webserver and the same rules apply to it.

This is absolutely true, yes. You will pretty quickly have dozens of rules this way.

This is also the way we simplified monitoring “domain-only” hosts for our non-checkmk technicians. This proved to be quite robust, yet simple to use.

As an addition: You could maybe have a look at the rule Host check command. You could set this to Assume host to always be up if you would not want to check host availability for your domains via (smart) ping.

Happy monitoring :slight_smile:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.