Check_httpv2 and address family

Hi,

the new HTTP(S) check plugin comes with many options, but one is missing: The ability to select the address family (IPv4 or IPv6) for establishing the connection.

It would be nice to be able to select “both” and two service checks would then be generated.

It looks like the feature is implemented, but for 2.4 only: Werk #15520: check_httpv2: Added new options to HTTP monitoring

How should we migrate to check_httpv2 in 2.3 when this is missing?

2 Likes

It’s not the only feature missing in 2.3 from the legacy check that prevents us from migrating. Not being able to control the actual IP address the request is sent to independently from the requested host name is a complete showstopper for roughly 50% of our checks (think of having multiple proxies handling the same requests, or active/passive clusters, or CDN frontends where you want to query the CDN itself but also the backend servers directly).

We need at least one major release cycle in which all features of the legacy HTTP check are available in HTTPv2 as well in order to migrate. Otherwise this will be a HUGE pain. (It is a huge pain already due to the sheer amount of work required, but losing all currently configured checks before being able to upgrade will suck so much)

1 Like

I would expect a migration script from the Checkmk team. N’est-ce pas @martin.hirschvogel ?

1 Like

That would be immensely helpful!

Script is in progress.

2 Likes

Seems the version on github has a “-p” flag to overwrite the IP.

I build it for fun:

./check_httpv2 --url https://www.google.at -p 142.250.203.99           ✔ 
Version: HTTP/2.0, Status: 200 OK | response_time=0.129126682s;;;0;10 time_http_headers=0.126151447s;;;; time_http_body=0.002975235s;;;; response_size=19698B;;;0;
URL to test: https://www.google.at/
Connected to server: 142.250.203.99
Method: GET
Version: HTTP/2.0
Status: 200 OK
Response time: 0.129 seconds
Page size: 19698 Bytes
User agent: checkmk-active-httpv2/2.4.0
./check_httpv2 --url https://www.google.at -p 1.1.1.1                2 ✘ 
error sending request for url (https://www.google.at/) (!!)
error sending request for url (https://www.google.at/) (!!)

Kind regards,
René

Yes, in 2.4 the features discussed here are available in check_httpv2.

But if we have to migrate from check_http (old version) before 2.4 we need these features already in 2.3.

Goal is that you can migrate during 2.4. That’s why we are also building and shipping the script for migration with 2.4.
Especially since we added these missing features in the meantime.
Added link to tool:

2 Likes

This is the promised tool

3 Likes
3 Likes

I just wanted to say thanks for this tool. We recently used it to migrate all of our deprecated HTTP checks.

After massaging the problems reported by the tool a bit with the available options (for us: mostly adding --v2-checks-certificates disable --cant-ignore-certificate-validation keep) & modifying a rather short list of checks I had to adjust manually, the actual migration of four hundred or so rules worked very well. It definitely saved us a ton of time and is pretty much guaranteed to provide a more consistent, less error-prune result than manual migration would have achieved.

So yeah — if you’re going to deprecate & remove well-used features, this is definitely the way to go.

Again, thanks!

6 Likes

Thanks Moritz! Appreciate your kind words. Means a lot!