CWP7 e rarolla bothata ba nginx Connection e hlotsoe ka phoso ea monit

Ho rarolla mathata liphoso tsa ho shebella CWP7 Monitor : nginx Khokahano e hlolehile ho lekola

CWP7 e rarolla bothata ba nginx Connection e hlotsoe ka phoso ea monit

Lekhetlong la ho qetela, ha Chen Weiliang a kenya software ea ho beha leihlo ea Monit phanele ea taolo ea CWP (CWP7) , o ile a rarolla bothata ba ts'ebetso ea ho beha leihlo ea Monit e nyamelang ha e qala (monit.service e hlōlehile).

Joale ke na le bothata bo bocha - khokahano ea Monit monitoring ea Nginx e hlotsoe ...

Mokhoa oa ho rarolla nginx Connection e hlotsoe ho monit?

Mokhoa oa ho rarolla Nginx Connection o hlolehile bothateng ba phoso ea monit:

Taba ea pele, SSH ka taelo e latelang ▼

ps -ef|grep nginx

Fumana faele ea tlhophiso ea nginx:

[root@ten ~]# ps -ef|grep nginx
root 11550 1 0 02:12 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nobody 11551 11550 0 02:12 ? 00:00:04 nginx: worker process
nobody 11552 11550 0 02:12 ? 00:00:08 nginx: worker process
nobody 11553 11550 0 02:12 ? 00:00:02 nginx: worker process
nobody 11554 11550 0 02:12 ? 00:00:01 nginx: worker process
nobody 11555 11550 0 02:12 ? 00:00:00 nginx: cache manager process
root 19827 9820 0 02:37 pts/0 00:00:00 grep --color=auto nginx

Bula faele ea tlhophiso ea nginx :

/etc/nginx/nginx.conf

Fumana sebaka sa tsela ea nginx.pid:

pid /var/run/nginx.pid;

Ka faeleng ea tlhophiso ea lenaneo la ho beha leihlo la Monit, kenya tlhophiso e latelang bakeng sa ho beha leihlo nginx▼

check process nginx with pidfile /var/run/nginx.pid
start program "/usr/bin/systemctl start nginx.service"
stop program "/usr/bin/systemctl stop nginx.service"
if failed port 8181 protocol http then restart
if 4 restarts within 8 cycles then timeoutif 4 restarts within 8 cycles then timeout

Qala hape lenaneo la ho beha leihlo la Monit▼

systemctl restart monit.service

Sheba boemo ba lenaneo la ho beha leihlo la Monit▼

systemctl status monit.service

Haeba mohato ona o fihlile, molaetsa oa phoso o ntse o hlaha:nginx Connection failed in monit

Ka kopo, leka ho fetola nomoro ea boema-kepe ea tlhophiso ea nginx ho "8181" kapa "80":

if failed port 8181 protocol http then restart
if failed port 80 protocol http then restart

Ebe, qala hape lenaneo la ho beha leihlo la Monit▼

systemctl restart monit.service

Sheba boemo ba lenaneo la ho beha leihlo la Monit▼

systemctl status monit.service

Bothata ba nginx Connection bo hlotsoe ho monit bo rarollotsoe qetellong!

Comments

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

Scroll ho Top