iLinuxPå servern, håll tjänsten igång stabilt för webbplatsenSEOVäldigt viktigt.
CWP kontrollpanelHjälper dig genom tjänsteövervakningsverktyg.
Hur aktiverar jag ServicesMonitor (systemd) i CWP-kontrollpanelen?
Så här aktiverar du tjänsteövervakning i CWP:
- ansluta till dinCWPinstallera
- slå uppServices Config->ServicesMonitor( SYSTEMD )alternativ
- Välj/Ange:
Aktivera inaktivera- Detta kommer att aktivera/inaktivera tjänsteövervakning.
Email aviseringarSkicka till - Ange e-postadressen där du kommer att få aviseringar.
Kontrollera varje- Tidsintervall mellan kontroller - Välj den tjänst du vill övervaka, till exempel: mariadb.service, monit.service
- klick提交knapp.Du kommer att se ett bekräftelsemeddelande:
Service Monitoring is not enabled Enabling monitoring in cron MAILTO=cwp1@ chenweilaing.com */15 * * * * root /usr/local/bin/svcMonitor-systemd Monitoring Enabled: Yes
För säkerhets skull:
- 如果systemd statustjänsten är
Unknown
,Övervakning kommer inte att fungera för tjänster. - Utvalda tjänster att övervaka kommer att sparas i fil
/usr/local/etc/services-monitor-systemd
i. - Övervakning av cron-jobb finns i filen
/etc/cron.d/svcMonitor-systemd
中skruva upp.
Du kan också passerachkconfigKommando för att manuellt lägga till/ta bort tjänster:
chkconfig service_name on
chkconfig service_name off
Till exempel, när alla tillgängliga tjänster är aktiverade kommer vi att visa cron-meddelanden som:
From: (Cron Daemon) <[email protected]> Subject: Cron <root@cwp1> /usr/local/bin/svcMonitor-systemd Restarted service amavisd.service on cwp1 at Sat Mar 31 01:00:01 EDT 2018 Job for amavisd.service failed because the control process exited with error code. See “systemctl status amavisd.service” and “journalctl -xe” for details. Restarted service arp-ethers.service on cwp1 at Sat Mar 31 01:00:03 EDT 2018 Restarted service [email protected] on cwp1 at Sat Mar 31 01:00:04 EDT 2018 Failed to stop [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Failed to get load state of [email protected]: Unit name [email protected] is missing the instance name. Failed to start [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Restarted service console-shell.service on cwp1 at Sat Mar 31 01:00:05 EDT 2018 Restarted service garb.service on cwp1 at Sat Mar 31 01:00:06 EDT 2018 Restarted service [email protected] on cwp1 at Sat Mar 31 01:00:07 EDT 2018 Failed to stop [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Failed to get load state of [email protected]: Unit name [email protected] is missing the instance name. Failed to start [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Restarted service ntalk.service on cwp1 at Sat Mar 31 01:00:09 EDT 2018 Job for ntalk.service failed because a configured resource limit was exceeded. See “systemctl status ntalk.service” and “journalctl -xe” for details. Restarted service rdisc.service on cwp1 at Sat Mar 31 01:00:10 EDT 2018 Job for rdisc.service failed because the control process exited with error code. See “systemctl status rdisc.service” and “journalctl -xe” for details. Restarted service [email protected] on cwp1 at Sat Mar 31 01:00:17 EDT 2018 Failed to stop [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Failed to get load state of [email protected]: Unit name [email protected] is missing the instance name. Failed to start [email protected]: Unit name [email protected] is missing the instance name. See system logs and ‘systemctl status [email protected]‘ for details. Restarted service svnserve.service on cwp1 at Sat Mar 31 01:00:18 EDT 2018 Job for svnserve.service failed because the control process exited with error code. See “systemctl status svnserve.service” and “journalctl -xe” for details. Restarted service tcsd.service on cwp1 at Sat Mar 31 01:00:19 EDT 2018 Job for tcsd.service failed because the control process exited with error code. See “systemctl status tcsd.service” and “journalctl -xe” for details. Restarted service vzfifo.service on cwp1 at Sat Mar 31 01:00:20 EDT 2020
CWP Kontrollpanel Aktivera ServicesMonitor (systemd) Videohandledning
Följande är hur CWP-kontrollpanelen aktiverar tjänsteövervakning ServicesMonitor (systemd) i den här artikelnYoutubeVideohandledning▼
Hope Chen Weiliang blogg ( https://www.chenweiliang.com/ ) delade "How to Enable ServicesMonitor (systemd) in the CWP Control Panel", vilket är användbart för dig.
Välkommen att dela länken till denna artikel:https://www.chenweiliang.com/cwl-1414.html
Välkommen till Telegram-kanalen på Chen Weiliangs blogg för att få de senaste uppdateringarna!
📚 Den här guiden innehåller ett enormt värde, 🌟Detta är ett sällsynt tillfälle, missa inte det! ⏰⌛💨
Dela och gilla om du vill!
Dina delning och likes är vår ständiga motivation!