We have anycast nameservers running named and bgpd, we have monit
dependency works so if the check of named fails, bgpd should stop. The
problem is that if for some reason named fails to start , monit still
starts bgp even if no named exists, right after monit sends "Execution
failed notification" of named, I wonder if it's a bug or  mis-config on my
end:


##bgp
check process bgpd with pidfile /var/run/quagga/bgpd.pid
    start program = "/etc/init.d/bgpd restart"
    stop  program = "/etc/init.d/bgpd stop"
    depends on named

##named
check process named with pidfile /usr/local/jail/dns/var/run/named.pid
 start program = "/etc/init.d/named start"
 stop program = "/etc/init.d/named stop"
 if failed host 127.0.0.1 port 53 type tcp protocol dns then restart
 if failed host 127.0.0.1 port 53 type udp protocol dns then restart
 if 2 restarts within 2 cycles then timeout



Logs:
[EDT Aug 21 10:27:48] error    : 'named' failed to start (exit status 127)
-- /etc/init.d/named: /etc/init.d/named: ..
[EDT Aug 21 10:27:48] debug    : Sending Execution failed notification to
[email protected]
[EDT Aug 21 10:27:48] debug    : 'bgpd' process test failed [pid=30991] --
No such process
[EDT Aug 21 10:27:48] info     : 'bgpd' start: /etc/init.d/bgpd
[EDT Aug 21 10:27:48] debug    : 'bgpd' process test failed [pid=30991] --
No such process
[EDT Aug 21 10:27:48] debug    : Shutting down bgpd: [FAILED]
Starting bgpd: [  OK  ]
[EDT Aug 21 10:27:48] debug    : 'bgpd' started


Thanks in advance!

Hillary
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to