CMK version: CRE 2.3.0
OS version: Ubuntu 22.04 LT
I am migrating my HTTP checks and noticed something. Scenario:
- You have a webserver in your monitoring, and it has a website you want to monitor.
- This vhost is behind Cloudflare as reverse proxy, so the DNS A record points to Cloudflare.
- You want to HTTP check the vhost both directly on the server and via Cloudflare.
With the old check, I created two HTTP checks on the server:
- on one, I just passed the “virtual host”, so it would contact the server’s web server and pass the vhost via
Host
header - on the other, I additionally set the
Address (name / IP or proxy)
field toHostname / IP address
with the vhost name/domain name, so Checkmk would resolve that hostname and retrieve the website via cloudflare instead
This way, if something happens, I can quickly see if my own server is the culprit or if there is something wrong with CF. Also I have graphs for both.
With the new httpv2 check, I couldn’t find a way to use a defined IP or DNS name (or a specific vhost for that matter), just a URL field. That makes me assume that it always resolves the domain name of the URL instead of checking on the server the check is created on.
I think this may be problematic, because covering my outlined scenario is not possible, and you might want to use the check to verify the website works on your server as opposed to where the DNS points to in general, because these might be different things.
Or I am missing something, which is entirely possible.