Created
September 17, 2014 14:44
-
-
Save mmattice/6662c3539e5249999aad to your computer and use it in GitHub Desktop.
Monit configuration to kick puppet agent processes if they get stuck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process puppet with pidfile /var/run/puppet/agent.pid | |
start program = "/etc/init.d/puppet start" | |
stop program = "/etc/init.d/puppet stop" | |
check file puppetdlock with path /var/lib/puppet/state/puppetdlock | |
if timestamp > 1 hour | |
then exec "/bin/bash -c '/etc/init.d/puppet stop ; rm -f /var/lib/puppet/state/puppetdlock'" | |
check file agent_catalog_run.lock with path /var/lib/puppet/state/agent_catalog_run.lock | |
if timestamp > 1 hour | |
then exec "/bin/bash -c '/etc/init.d/puppet stop ; rm -f /var/lib/puppet/state/agent_catalog_run.lock'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment