Created
February 13, 2018 12:36
-
-
Save eclecticmiraclecat/529d0ca25b1f982408505d9c106ffad2 to your computer and use it in GitHub Desktop.
monit script to check number of apache processes
This file contains hidden or 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 program apache2 with path "/bin/bash -c '[ $(/bin/ps auxwww | /bin/grep apache | /bin/grep -v grep | /usr/bin/wc -l) -gt 2 ]'" | |
start program = "/etc/init.d/apache2 start" | |
stop program = "/etc/init.d/apache2 stop" | |
restart program = "/etc/init.d/apache2 restart" | |
if status != 0 then restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment