EEEk, what a horrendous maillist manager.

looking at the file: https://sourcesup.renater.fr/scm/viewvc.php/branches/sympa-6.1-branch/src/etc/script/sympa.in?root=sympa

It would be better to create 2 scripts which can accept a module name variable.. based on the init.d/symba

symba_start, containing the function sympa_module_start()

symba_stop, containing the function sympa_module_stop()


And then use the following:

/etc/monit/scripts/sympa_start sympa
/etc/monit/scripts/sympa_start bulk
/etc/monit/scripts/sympa_start archived
/etc/monit/scripts/sympa_start bounced
/etc/monit/scripts/sympa_start task_manager

/etc/monit/scripts/sympa_stop bounced
/etc/monit/scripts/sympa_stop archived
/etc/monit/scripts/sympa_stop bulk
/etc/monit/scripts/sympa_stop sympa
/etc/monit/scripts/sympa_stop task_manager

This way you arn't nuking all the working services, when one fails.

I have some something similar for an equally horrendous script...

On 3/5/2014 1:45 AM, Michael Johnson - MJ wrote:
I don't know if this will work for you or not, but you could try specifying /bin/true for the start an stop scripts those that don't have one.

Alternately, you could figure out the commands to stop and start the individual pieces restart only the process(es) that died.


On Tue, Mar 4, 2014 at 2:48 PM, John Bazik <[email protected] <mailto:[email protected]>> wrote:

    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

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




--
Michael Johnson - MJ


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

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

Reply via email to