i have classic situation. need configure monit memcached on centos7. problem is, configs can find in google contains row:
check process memcached pidfile /var/run/memcached/memcached.pid
however, there no memcached.pid file in /var/run , no /var/run/memcached folder. i've checked /usr/lib/systemd/system/memcached.service
[service] type=simple environmentfile=-/etc/sysconfig/memcached execstart=/usr/bin/memcached -u $user -p $port -m $cachesize -c $maxconn $options
so, there no path .pid file. question can check memcached without .pid file? second question - can .pid file in location?
replace in monit config
check process memcached pidfile /var/run/memcached/memcached.pid
with
check process memcached match memcached
my config memcached:
check process memcached match memcached start program = "/usr/bin/systemctl start memcached" stop program = "/usr/bin/systemctl stop memcached" if failed host 127.0.0.1 port 11211 protocol memcache restart if cpu > 70% 2 cycles alert if cpu > 98% 5 cycles restart if 2 restarts within 3 cycles timeout
centos 7, monit 5.14
Comments
Post a Comment