Hi, I did a search in thus forum, didn't find a good solution.
My setup:
2 Raspberry Pi Servers (, )
Installed Pi Hole on each one
Router DNS is set to DNS1=, DNS2=
What I want to achieve:
Raspberry Pi Server 1 monitors Server 2; Server 2 monitors Server 1
In Server 1, every X minutes, perform a DNS lookup for a URL using Server 2
In Server 2, every X minutes, perform a DNS lookup for a URL using Server 1
If the check fails, try to
(a) restart pi hole service on the other server
(b) restart the other server
(c) send email notification if restart doesn't work, so I know I need to manually power cycle the server
For monitoring at home, I use uptime-kuma. It is a rudimentary monitoring software and can send notifications. I'm not sure if it's possible to configure any actions. I am not a big fan of automatic updates/restarts of any kind, because that usually makes things worse.
It offers public status pages. Whenever family/friends/.... tells me "the internet is down", "service xyz not working" i point them to the status page with dns, html, ... checks. When this page is "red", then i will look at it.