monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Considerations when using Monit with systemd


From: address@hidden
Subject: Re: Considerations when using Monit with systemd
Date: Sat, 20 Apr 2019 11:35:43 +0200

Hi,

if you control the same services with systemd and the system is stopping, monit should be stopped first to prevent collision between monit and systemd.

Starting the system services on boot in parallel with systemd should work fine - systemd will just get a request from monit to start the service and even if the start is pending already, it's no problem.

Best regards,
Martin


On 16 Apr 2019, at 14:01, Jamie Burchell <address@hidden> wrote:

Hi!

 

I’m successfully (and happily) using Monit to monitor services that have suddenly exited on a CentOS 7 setup. For example:

 

check process mariadb with pidfile /var/lib/mysql/hostname.pid
      start program = "/bin/systemctl start mariadb"
      stop program = "/bin/systemctl stop mariadb"
      restart program = "/bin/systemctl restart mariadb"
      if failed port 3306 protocol mysql then restart
      if 3 restarts within 5 cycles then unmonitor

 

Do I need to do anything else to make Monit and systemd play together nicely? My concerns are:

 

1. What happens when the system is shutting down, does Monit frantically try to start things up that are shutting down, or has Monit itself been stopped by that point?

 

2. Is there are problem with Monit trying to start services at the same time systemd does at system boot time?

 

 

Thanks in advance!
Jamie

 

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]