CWP控制面板将通过服务监控工具为你提供帮助。
CWP控制面板怎样开启ServicesMonitor (systemd)?
要在CWP中启用服务监控:
- 连接到你的CWP安装
- 查找Services Config->ServicesMonitor( systemd )选项
- 选择/输入:
Enable/Disable——这将启用/禁用服务监控。
Email notifications发送至——输入你将在其中接收通知的电子邮件地址。
Check every——两次检查之间的时间间隔 - 选择你要监控的服务,例如:mariadb.service、monit.service
- 单击提交按钮。你将看到一条确认消息:
Service Monitoring is not enabled Enabling monitoring in cron [email protected] chenweilaing.com */15 * * * * root /usr/local/bin/svcMonitor-systemd Monitoring Enabled: Yes
注意事项:
你也可以通过chkconfig命令,手动添加/删除服务:
chkconfig service_name on
chkconfig service_name off
例如,当启用所有可用服务时,我们将显示cron消息,例如:
From: (Cron Daemon) <[email protected]> Subject: Cron <[email protected]> /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控制面板启用ServicesMonitor (systemd)视频教程
以下是本文CWP控制面板如何启用服务监控ServicesMonitor (systemd)的YouTube视频教程 ▼