2020年9月23日星期三

CWP控制面板如何启用服务监控ServicesMonitor (systemd)

原文链接:https://www.chenweiliang.com/cwl-1414.html

Linux服务器上,保持服务稳定运行,对于网站SEO非常重要。


CWP控制面板将通过服务监控工具为你提供帮助。


CWP控制面板如何启用服务监控ServicesMonitor (systemd)


CWP控制面板怎样开启ServicesMonitor (systemd)?


要在CWP中启用服务监控:


  1. 连接到你的CWP安装

  2. 查找Services Config->ServicesMonitor systemd 选项

  3. 选择/输入:
    Enable/Disable——这将启用/禁用服务监控。
    Email notifications发送至——输入你将在其中接收通知的电子邮件地址。
    Check every——两次检查之间的时间间隔

  4. 选择你要监控的服务,例如:mariadb.service、monit.service

  5. 单击提交按钮。你将看到一条确认消息:

Service Monitoring is not enabled
Enabling monitoring in cron
MAILTO=cwp1@ chenweilaing.com
*/15 * * * * root /usr/local/bin/svcMonitor-systemd
Monitoring Enabled: Yes

注意事项:


  • 如果systemd状态服务是未知,监控不会为服务工作。

  • 选定要监控的服务,将保存在文件 /usr/local/etc/services-monitor-systemd中。

  • 监控cron作业可以在文件/etc/cron.d/svcMonitor-systemd找到。

你也可以通过chkconfig命令,手动添加/删除服务:


chkconfig service_name on
chkconfig service_name off

例如,当启用所有可用服务时,我们将显示cron消息,例如:


From: (Cron Daemon) <root@cwp1.yourdomain.com>
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 autovt@.service on cwp1 at Sat Mar 31 01:00:04 EDT 2018 Failed to stop autovt@.service: Unit name autovt@.service is missing the instance name.

See system logs and ‘systemctl status autovt@.service‘ for details.

Failed to get load state of autovt@.service: Unit name autovt@.service is missing the instance name.

Failed to start autovt@.service: Unit name autovt@.service is missing the instance name.

See system logs and ‘systemctl status autovt@.service‘ 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 getty@.service on cwp1 at Sat Mar 31 01:00:07 EDT 2018 Failed to stop getty@.service: Unit name getty@.service is missing the instance name.

See system logs and ‘systemctl status getty@.service‘ for details.

Failed to get load state of getty@.service: Unit name getty@.service is missing the instance name.

Failed to start getty@.service: Unit name getty@.service is missing the instance name.

See system logs and ‘systemctl status getty@.service‘ 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 serial-getty@.service on cwp1 at Sat Mar 31 01:00:17 EDT 2018 Failed to stop serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

See system logs and ‘systemctl status serial-getty@.service‘ for details.

Failed to get load state of serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

Failed to start serial-getty@.service: Unit name serial-getty@.service is missing the instance name.

See system logs and ‘systemctl status serial-getty@.service‘ 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视频教程 ▼






欢迎转载《CWP控制面板如何启用服务监控ServicesMonitor (systemd)
陈沩亮版权所有,转载请注明出处链接:https://www.chenweiliang.com/cwl-1414.html


网站地址:https://www.chenweiliang.com/



欲获取更多资讯内幕和秘技,欢迎进入Telegram频道:cwlboke

没有评论:

发表评论