Exclude a group from Monit While starting Monit Daemon

Good day! Can anyone help me to exclude a group while starting Monit daemon.

Eg: I have 3 groups download, upload and deleter. I need to make sure that upload group don’t get started while booting up the machine. So all I need is to exclude upload group while Monit starts.

Sorry for the long break. We sorted it out with a simple logic.

Creating Softlink of the Binary of the service which is included in Monit. Then adding a check in init script with our condition.

Eg: Here we needed to manage a service named Upload. Binary for the service was included in monit config directory by default [/etc/monit/conf.d/upload] which get invokes when Monit is started. So first we moved that binary to a custom location. Then we set the our logic in init script of Monit, as ‘if x meets our requirement’, a soft link of the Upload binary gets created inside ‘/etc/monit/conf.d’, which invokes upload service when Monit starts. The soft link is removed when Monit is stopped. In case if the machine boots up with a scenario that doesn’t agree our condition, no softlink of Upload binary is created inside monit config, so monit simply starts omitting the Upload service.

We later standardized it by including our condition inside the Binary itself, so that exit happens at binary level.

Sorry if my explanation is confusing :smiley: Ravi may have a good language to explain it properly :wink:

2 Likes

@wubyz Thanks for letting us know…