monit-general
[Top][All Lists]
Advanced

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

one start script, multiple pids


From: John Bazik
Subject: one start script, multiple pids
Date: Tue, 4 Mar 2014 17:48:53 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

I have the following in my monitrc:

check process sympa with pidfile /var/run/sympa/sympa.pid
  start program = "/etc/init.d/sympa start"
  stop program = "/etc/init.d/sympa stop"
  mode manual
  group sympa

check process sympa_bulk with pidfile /var/run/sympa/bulk.pid
  depends on sympa
  mode manual
  group sympa

check process sympa_archived with pidfile /var/run/sympa/archived.pid
  depends on sympa
  mode manual
  group sympa

check process sympa_bounced with pidfile /var/run/sympa/bounced.pid
  depends on sympa
  mode manual
  group sympa

check process sympa_task_manager with pidfile /var/run/sympa/task_manager.pid
  depends on sympa
  mode manual
  group sympa


There is just one boot script that spawns five daemons, each with its
own pidfile.  If any one of them goes down, I want monit to invoke that
script to restart everything.

The configuration above does not work.  Monit complains that the
four dependent checks have no start/stop script.  When I reverse the
dependencies, I get the same thing.  When I first played with this, (if
I remember correctly) I found that if I assigned the common start/stop
script to each check, monit would run it five times.

I can't find any monit configuration example that fits this situation,
and nothing in the doc suggests itself to me as a solution.

Is there some way to do this?

John



reply via email to

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