monit-general
[Top][All Lists]
Advanced

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

How to combine RHEL systemd and monit?


From: Sonderegger, Markus
Subject: How to combine RHEL systemd and monit?
Date: Tue, 9 Jul 2019 15:32:08 +0000

Hi all

I am new to this mailing-list so bear with me if this question already came up even so I could not find an adequate answer in the archives so far.

 

I am responsible for managing applications like IBM MQ, IBM Integration Bus, Appia FIX Engine and many supporting and monitoring tools written in Perl and Bash.

We managed these applications using Veritas Cluster Server (VCS) on Solaris implementing the Start, Stop, Clean and Monitor Program.

 

Now we are forced to migrate to Linux and our Sys Admins want that we manage our applications using systemd using sudo commands as we do not have root access.

 

I then discovered monit which is a good replacement of the intelligent watchdog functionality VCS did deliver with additional functionality much appreciated.

I am very happy with the functionality of monit even if currently we can’t run it under root.

 

But I face an issue to smoothly bring down the applications when systemd controls monit.

Our SysAdmin has defined the following systemd entries:

 

ExecStart=/opt/monit/bin/monit -I -v
ExecStop=/opt/monit/bin/monit stop all
ExecStop=/bin/bash -c "while true; do if [ $(/opt/monit/bin/monit -B status | /bin/egrep '^\s*status' | /bin/egrep -c 'OK|Initializing') -eq 0 ] ; then break; else echo waiting; sleep 5; fi; done"
ExecStop=/opt/monit/bin/monit quit

 

but this does not work smoothly as systemd kills the processes before they are smoothly shut down.

 

Doing it manually with monit stop all works fine but not with systemd.

 

Is there a better way to bring down monit so that systemd waits until monit has brought down all my processes?

 

Many thanks for your help.

Regards

Markus

––––––––––––––––––––––––––––––

Dr. Markus Sonderegger

Executive Director

Head Application Integration

 

Bank Julius Baer & Co. Ltd.

Hohlstrasse 600, P.O. Box

8010 Zurich, Switzerland

T +41 58 88 77281

M +41 79 698 09 79

F +41 58 88 74851

www.juliusbaer.com

 



*****JuliusBaer Disclaimer***** This e-mail is for the intended recipient only and may contain confidential or privileged information. If you have received this e-mail by mistake, please contact us immediately and completely delete it (and any attachments) and do not forward it or inform any other person of its contents. If you send us messages by e-mail, we take this as your authorisation to correspond with you by e-mail, however, we reserve the right not to execute orders and instructions transmitted by e-mail at any time and without further explanation. If you do not wish to receive any further e-mail correspondence please let us know. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, amended, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Neither the Julius Baer Group nor the sender accept liability for any errors or omissions in the content of this message which arise as a result of its e-mail transmission. Please note that all e-mail communications to and from the Julius Baer Group may be monitored. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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