ubuntu – Monit配置重新加载 – 应该重启受监控的服务?

ubuntu服务器上运行Monit 5.4.当我使用monit reload时,它似乎重新启动受监视的服务(在这种情况下为Tomcat 7).这是预期的行为吗? Documentation says

reload – Reinitialize a running Monit daemon,the daemon will reread its configuration,close and reopen log files.

我希望它不会重新启动任何服务,只会重新加载它的配置,这样我就可以更改电子邮件警报和其他东西.

这是monit状态的输出

The Monit daemon 5.4 uptime: 15h 0m 

Process 'tomcat7'
  status                            Running
  monitoring status                 Monitored
  pid                               38842
  parent pid                        1
  uptime                            14h 30m 
  children                          0
  memory kilobytes                  3445964
  memory kilobytes total            3445964
  memory percent                    10.4%
  memory percent total              10.4%
  cpu percent                       14.8%
  cpu percent total                 14.8%
  port response time                0.018s to localhost:80 [HTTP via TCP]
  data collected                    Tue,17 Jun 2014 15:39:36

System 'mytiny.company.net'
  status                            Running
  monitoring status                 Monitored
  load average                      [0.32] [0.49] [0.57]
  cpu                               15.5%us 0.2%sy 0.0%wa
  memory usage                      8217684 kB [25.0%]
  swap usage                        14980 kB [0.7%]
  data collected                    Tue,17 Jun 2014 15:39:36

这是monitrc中的Tomcat监控配置

# Tomcat
check process tomcat7 with pidfile /var/run/tomcat7.pid
start program = "/etc/init.d/tomcat7 restart"
stop program = "/etc/init.d/tomcat7 stop"

if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart

if Failed port 80 and protocol http
  then restart
if 5 restarts within 5 cycles then timeout

文件的其余部分是认的,但检查间隔为60秒. Tomcat确实在80端口上运行.

这不是应该发生的事情. monit reload只重新读取其配置文件并应用新的更改.如果你服务monit restart你有同样的问题吗?

你怎么知道Tomcat实际上正在重启?

请粘贴monit状态的输出.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...