memcached pid dosyasını bulamıyor mu? CentOS 7, memcache pid'i belirtir

CentOS 7 memcached için yapılandırılması gerekiyor İzleme izlemeProgramladığımda memcached'in pid dosyasını bulamama sorunuyla karşılaşıyorum...

memcached pid dosyasını bulamıyor mu? CentOS 7, memcache pid'i belirtir

Google'da bulabileceğimiz tüm yapılandırmalar bu satırı içerir:

check process memcached with pidfile /var/run/memcached/memcached.pid

fakat,/var/run içinde yok memcached.pid dosya, ne de /var/run/memcached dosya.

kontrol /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
  • Bu nedenle, .pid dosyasının yolu yoktur.
  • Bir .pid dosyası olmadan memcached kontrol ediliyorsa?
  • Ayrıca, bu .pid dosyası başka bir konumda olabilir mi?

CentOS 7, memcache pid dosyasının konum adresini nasıl belirler?

Çözüm, Monit izleme yapılandırmasında belirttiğiniz memcache pid dosya adresini belirtmektir.

check process memcached with pidfile /var/run/memcached/memcached.pid

Aşağıdaki memcached pid'nin dosya adresiyle değiştirin▼

check process memcached with match memcached

Memcached için yapılandırmamız:

check process memcached with 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 then restart
if cpu > 70% for 2 cycles then alert
if cpu > 98% for 5 cycles then restart
if 2 restarts within 3 cycles then timeout

Centos 7 Monit izleme 5.14'ün kurulum yöntemi için lütfen aşağıdaki eğiticiye bakın▼

发表 评论

E-posta adresiniz yayımlanmayacaktır. 必填 项 已 用 * 标注

En gidin