Skip to content

Instantly share code, notes, and snippets.

@xnohat
Forked from jacobwyke/beanstalkd
Last active December 15, 2020 19:10
Show Gist options
  • Save xnohat/d8eb705114832f5c7d3934b4ba36a6eb to your computer and use it in GitHub Desktop.
Save xnohat/d8eb705114832f5c7d3934b4ba36a6eb to your computer and use it in GitHub Desktop.
Beanstalkd Monit File
#
# /etc/monit.d/beanstalkd
#
# CentOS notes:
# CentOS beanstalkd doesn't have pid file.
# in /etc/init.d/beanstalkd modify the daemonize line with a -p /var/run/beanstalk.d
# daemon /usr/sbin/daemonize -p /var/run/beanstalkd.pid -u ${BEANSTALKD_USER} $exec $options
#
check process beanstalkd with pidfile /var/run/beanstalkd.pid
start "/sbin/service beanstalkd start"
stop "/sbin/service beanstalkd stop"
if failed port 11300
send "stats\r\n"
expect "OK [0-9]{1,}\r\n"
then restart
if 5 restarts within 5 cycles then timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment