memcached ei leia pid-faili? CentOS 7 määrake memcache pid

CentOS 7 -s memcached'i monitooringuprogrammi Monit seadistamisel tekkis probleem, et memcached ei leidnud pid-faili...

memcached ei leia pid-faili? CentOS 7 määrake memcache pid

Kõik konfiguratsioonid, mida me guugeldades leiame, sisaldavad seda rida:

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

aga,/var/run Mitte ühtegi sisse memcached.pid fail, ega /var/run/memcached kausta.

kontrollitud /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
  • Seetõttu puudub .pid-faili tee.
  • Kui kontrollite memcached ilma pid-failita?
  • Lisaks, kas see .pid-fail võib olla teises asukohas?

Kuidas CentOS 7 määrab memcache pid-faili asukoha aadressi?

Lahendus on määrata memcache pid-faili aadress, mille määrasite Moniti jälgimise konfiguratsioonis▼

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

Asendage järgmise vahemällu salvestatud pid▼ failiaadressiga

check process memcached with match memcached

Meie konfiguratsioon memcached jaoks:

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 monitooringu 5.14 installimeetodi kohta vaadake järgmist õpetust▼

发表 评论

您的邮箱地址不会被公开.必填项已用*标注

Leidke Top