[Pdns-users] Monitoring with Monit

Roman Gaufman hackeron at gmail.com
Mon Jan 28 10:06:50 UTC 2013

 I'm trying to monitor my pdns instance with monit. Main reason is I've
been having some trouble with the pipe backend: it stops resolving requests
after a few days (even when using the pdns guardian option).

The official monit documentation says to do this for DNS:

   if failed host port 53 type tcp protocol dns then restart
   if failed host port 53 type udp protocol dns then restart

But it seems powerdns does not like the "protocol dns" option and monit
fails to connect to powerdns and eventually kills it.

I tried to find more information and found this: Monit's check for DNS
protocol was to query for the hint.zone (".") and if the name server you
try to monitor does not allow recursive queries from the monitoring host
the check fails.

I added allow-recursion= to my pdns.conf file but that didn't seem
to help.

Any ideas what I'm missing?

As a side note, my current monit config is:

check process powerdns with pidfile /var/run/pdns.pid
   start program = "/etc/init.d/pdns start"
   stop program = "/etc/init.d/pdns stop"
   check program host with path "/usr/local/bin/check_host.sh"
     if status != 0 then restart
   if 5 restarts within 5 cycles then timeout

The check_host.sh script has:
/usr/bin/dig @ random$RANDOM-host$RANDOM.com

This works but seems a bit of a hack.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20130128/52fad748/attachment.html>

More information about the Pdns-users mailing list