Monitoring ipv4+ipv6 dual stack

I’m trying to figure out how to monitor IPv6 vs IPv4 …
for example check_http got flags for both to enforce.
What is it doing by default if the server is reachable with both?
Does it prefer v6 or v4 or is it selecting what to use at random?

I’m thinking just checking ping4/ping6 is not really enough so i want to check http and other services where there are options to enforce a version explicitly.

If you use define an address and address6 for the host object Icinga 2 will use the address as the ipv4-or-ipv6 macro will prefer the address. Also some checkcommands do not utilize the macro and require a specific value to be given or default to address.

If you do add a fqdn instead of the IPv4 address as address, it will do a DNS lookup and then based on your system use v4 or v6 with Linux typically preferring v6.

So in the rare cases I had a customer using dual stack I more or less duplicated the services and enforced the protocol, so I could be sure monitoring of both is working like expected.

Another idea one customer had was a wrapper script executing the service twice, one time for v4 and one for v6. This will keep the number of services lower, but for me it is another layer of potential failure and misconfiguration and perhaps it does not even provide a better overview.

1 Like

That seems like the way to go for me too.