0

I have configured monit to check for my services, and I'm checking if one of the services still sane. If this service is not working as it should I would want monit to restart ALL the services I'm currently monitoring (as they sort of depend on each other).

Currently I've put all my services in one group, so I could write

if failed MY_TEST exec "/usr/sbin/monit -g MY_GROUP restart"

I wanted to do Something like:

if failed MY_TEST restart group MY_GROUP

Is there any action that I could take to do this internally (i.e. without calling monit from monit)?

Vargas
  • 143
  • 1
  • 8

1 Answers1

1

The monit guides all say you need to call monit from monit to restart a group of services. However, you could make it execute a script someplace that restarts all the services via their normal methods.

Nathan C
  • 14,901
  • 4
  • 42
  • 62