Reload of a group not possible if there is a synax error in other group

Issue #550 closed
Michel Erard created an issue

We are using one monit instance to monitor different applications on a server. Every application installs its own set of monitoring rules in a dedicated file and group. Unfortunately the installation of an application currently fails, if during the installation process another application has a syntax error in its group. Even if we just do a reload of the specific group.

monit -g app-one reload

It would be nice if there would be a kind of a sandbox for every group. Tricky I know. How does monit know where the configuration of the group is, without parsing all the files? Suggestion, add a system flag that links a group to a file. For Example, all Configuration written in a file called 'app-one' automatically assigns the content to group 'app-one'? So Monit knows that it only has to parse this dedicated file while reloading the group.

Comments (1)

  1. Tildeslash repo owner

    It is possible to validate the configuration syntax before reload using "monit -t".

    If independent configuration is needed for each service group, it is possible to split the monit configuration into multiple monit instances (the path to the configuration file can be set using the "-c <path>" option).

    Note that each instance needs its own httpd port, pidfile, statefile and idfile, for example:

    set idfile /etc/monit_instance_1/
    set pidfile /etc/monit_instance_1/
    set statefile /etc/monit_instance_1/monit.state
  2. Log in to comment