Yuav ua li cas rau nruab Monit soj ntsuam kev pab cuam ntawm HestiaCP? Cov lus piav qhia ntxaws txog txoj kev teeb tsa ntawm Monit

Qhov tseeb txaus ntshai: yog vim li cas koj tseem tsis tau nyob ntawm no HestiaCP Nruab Monit rau?

Tam sim no cia peb tham txog vim li cas Monit yog ib qho ntawm cov koom tes zoo tshaj plaws rau cov neeg siv HestiaCP.

Monit tso cai rau koj los saib xyuas cov kev pabcuam tseem ceeb ntawm koj lub server, xws li Nginx, PHP-FPM thiab MySQL.

Thiab, koj tuaj yeem koom ua ke Monit rau hauv koj lub HestiaCP hauv ob peb kauj ruam yooj yim, yooj yim li kis butter ntawm qhob cij. Koj puas npaj txhij? Cia peb pib!

Monit yog dab tsi? Vim li cas nws tseem ceeb heev rau HestiaCP?

Ua ntej peb dhia mus rau hauv cov lus qhia, cia peb saib luv luv ntawm Monit. Monit yog lub teeb pom kev zoo qhib qhov cuab yeej uas tuaj yeem saib xyuas cov txheej txheem thiab cov kev pabcuam hauv Unix systems.

Yog tias tus txheej txheem hangs, Monit tuaj yeem rov pib dua nws kom ntseeg tau tias koj lub server ib txwm ua haujlwm ib txwm.

Nws zoo li muaj 24/7 bodyguard rau koj tus neeg rau zaub mov, ib qho uas tsis tsuas yog txhim khu kev qha, tab sis kuj teb.

Cov xwm txheej tsim nyog rau kev txhim kho Monit ntawm HestiaCP

Ua ntej txhim kho Monit, thov nco ntsoov tias koj muaj cov xwm txheej hauv qab no:

  • Hestia tswj vaj huam sib luag ntsia
  • Muaj kev nkag hauv paus

Yog tias koj ua tau raws li cov qauv no, ces peb zoo mus.

Kauj ruam 1: Hloov kho cov pob khoom

Ua ntej, xyuas kom tseeb tias koj cov pob khoom siv tau hloov tshiab. Hloov kho cov pob khoom siv cov lus txib hauv qab no:

apt update

Qhov no yog ib qho tseem ceeb vim hais tias cov txheej txheem pob hloov tshiab tuaj yeem kho qhov muaj qhov tsis zoo thiab xyuas kom meej tias koj muaj qhov tseeb version ntawm Monit ntsia.

Kauj ruam 2: Nruab Monit

Tom qab qhov kev hloov tshiab tiav lawm, koj tuaj yeem nruab Monit. Nkag mus rau cov lus txib nram qab no rau nruab:

apt install monit

Cov kauj ruam no yuav cia li rub tawm thiab nruab Monit, koj tsuas yog yuav tsum tau ua siab ntev rau ob peb feeb.

Kauj ruam 3: Pab kom Monit service

Tom qab kev teeb tsa tiav lawm, tsis txhob hnov ​​​​qab qhib qhov kev pabcuam Monit kom nws ua haujlwm tau zoo thaum lub kaw lus pib. Qhib cov kev pabcuam siv cov lus txib hauv qab no:

systemctl enable monit

Qhov no sib npaug rau kev txhim kho ob lub log tsis siv neeg ntawm Monit Thaum twg koj rov pib lub server, nws yuav pib ua haujlwm.

Kauj ruam 4: Pib qhov kev pab cuam Monit

Tom ntej no, pib qhov kev pabcuam Monit thiab cia nws pib ua haujlwm:

systemctl start monit

Tam sim no uas Monit tab tom khiav hauv keeb kwm yav dhau, nws tau npaj los saib xyuas koj qhov kev pabcuam.

Kauj ruam 5: Configure Monit

Lub neej ntawd teeb tsa ntawm Monit yuav tsis haum rau txhua qhov chaw, yog li peb yuav tsum tau ua qee qhov kev hloov kho. kho /etc/monit/monitrc file thiab ntxiv cov ntsiab lus hauv qab no:

set httpd port 2812 and
  use address 0.0.0.0
  and allow localhost

check process nginx with pidfile /var/run/nginx.pid
  group nginx
  start program = "/etc/init.d/nginx start"
  stop program = "/etc/init.d/nginx stop"

check process php-fpm with pidfile /var/run/php/php7.4-fpm.pid
  group php-fpm
  start program = "/etc/init.d/php7.4-fpm start"
  stop program = "/etc/init.d/php7.4-fpm stop"

check process mysql with pidfile /var/run/mysqld/mysqld.pid
  group mysql
  start program = "/etc/init.d/mysql start"
  stop program = "/etc/init.d/mysql stop"

Txoj cai configuration no ua ntau yam:

  1. Qhib Monit lub web interface, koj tuaj yeem hla http://your_server_ip:2812 nkag mus rau nws.
  2. Saib xyuas Nginx, PHP-FPM thiab MySQL Kev pabcuam, xyuas kom lawv ib txwm nyob online.

Kauj ruam 6: Teeb tsa qhov pib tsis siv neeg ntawm Monit kev pabcuam

Sau cov lus txib nram qab no

systemctl enable monit
systemctl start monit
  • Yog hais tias yuam kev lus "sudo systemctl start monitmonit.service is not a native service, redirecting to systemd-sysv-install.", thov nias qhov txuas hauv qab no mus saib cov kev daws teeb meem ▼

Kauj ruam 7: Rov pib qhov kev pabcuam Monit

Tom qab kev teeb tsa tiav lawm, tsis txhob hnov ​​​​qab rov pib qhov kev pabcuam Monit los ua kom cov kev teeb tsa muaj txiaj ntsig:

systemctl restart monit

Nws zoo li ua pa lub neej tshiab rau hauv Monit thiab tam sim no npaj los qhia tawm.

Yuav ua li cas thiaj paub tseeb tias Monit installation ua tiav?

Tom qab lub installation tiav, qhib lub browser thiab mus saib http://your_server_ip:2812, koj yuav tsum pom Monit's dashboard.

Yog tias txhua yam zoo li qub, koj yuav pom cov xwm txheej ntawm Nginx, PHP-FPM thiab MySQL.

Lawv cov xwm txheej qhia tau hais tias "Khiav", qhia tias lawv khiav ib txwm.

Yog tias ib qho ntawm cov txheej txheem no tsis ua haujlwm, Monit cia li sim rov pib dua lawv.

Yuav rov nruab Monit li cas

Yog tias koj pom tias muaj teeb meem nrog kev teeb tsa Monit, lossis koj yuav tsum rov kho nws, koj tuaj yeem rov nruab Monit siv cov lus txib hauv qab no:

apt-get remove monit
apt-get install monit

Qhib chaw nres nkoj 2812: Nco ntsoov tias koj tuaj yeem nkag mus rau Monit lub vev xaib interface

Txhawm rau kom ntseeg tau tias Monit lub vev xaib cuam tshuam tuaj yeem nkag mus tau ib txwm, koj yuav tsum qhib qhov chaw nres nkoj 2812.

monitrc Hauv cov ntaub ntawv, xyuas kom meej tias HTTPD mloog tau raug teeb tsa thiab 2812 chaw nres nkoj thiab qhov chaw nyob IP raug teev tseg.

Qhib chaw nres nkoj 2812 hauv HestiaCPCP

Thaum koj tau ntse ntsiaSaib xyuas, yuav tsum tau teeb tsa lub daemon, pab kom cov chaw nres nkoj, IP chaw nyob thiab lwm qhov chaw.

Kauj Ruam 1:Nkag mus rau hauv koj lub HestiaCPCP

Kauj Ruam 2:Nkag mus rau firewall.

  • Nyem "Firewall" saum toj no navigation.

Kauj Ruam 3:Nyem qhov + khawm.

  • Thaum koj hla lub pob +, koj yuav pom lub pob hloov mus rau "Add Rule".

Kauj Ruam 4:Ntxiv cov cai.

Siv cov hauv qab no raws li txoj cai teeb tsa ▼

  • Kev Ua: Txais
  • Txoj Cai: TCP
  • cev: 2812
  • IP chaw nyob: 0.0.0.0/0
  • Lus ceeb toom (yeem): MONIT

Cov hauv qab no yog lub screenshot ntawm HestiaCP firewall nqis ▼

Yuav ua li cas rau nruab Monit soj ntsuam kev pab cuam ntawm HestiaCP? Cov lus piav qhia ntxaws txog txoj kev teeb tsa ntawm Monit

Xaus: Kev sib xyaw zoo meej ntawm Monit thiab HestiaCP

Lub sijhawm no, koj yuav tsum tau ua tiav thiab teeb tsa Monit ntawm HestiaCP.

Nws yuav dhau los ua koj tus pab sab xis hauv kev tswj hwm server, ua kom muaj kev ua haujlwm zoo ntawm txhua qhov kev pabcuam tseem ceeb.

Ntxiv mus, Monit lub web interface tso cai rau koj los saib xyuas cov xwm txheej ntawm txhua tus txheej txheem thiab khaws txhua yam hauv kev tswj hwm.

Ua haujlwm!Configure Monit rau koj lub server tam sim no los txhim kho nws txoj kev ruaj ntseg thiab kev ntseeg tau. Koj tus kheej yav tom ntej yuav ua tsaug rau qhov kev xaiv ntse uas koj tau ua tam sim no.

评论 评论

Koj email chaw nyob yuav tsis raug luam tawm. Yuav tsum tau siv cov liaj teb * Ntaus Cim

Scroll rau saum