Skip to content

Instantly share code, notes, and snippets.

@jacobwyke
Created May 22, 2016 06:51
Show Gist options
  • Save jacobwyke/50227ee16779ea997e891093b18859de to your computer and use it in GitHub Desktop.
Save jacobwyke/50227ee16779ea997e891093b18859de to your computer and use it in GitHub Desktop.
Beanstalkd Monit File
#
# /etc/monit/conf.d/beanstalkd
#
check process beanstalkd with pidfile /var/run/beanstalkd.pid
start "/usr/bin/service beanstalkd start"
stop "/usr/bin/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
@alxx
Copy link

alxx commented Jan 25, 2018

How do you get beanstalkd to save its pid someplace?

@xnohat
Copy link

xnohat commented Dec 15, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment