We can use Control Groups in Rigor to control settings for a group of checks using a single command, configured in the application or via API calls.
For example, we can programatically pause groups of Rigor checks when we push code to production and programatically unpause groups of checks when a build is complete. With this method any downtime associated with code pushes won’t send alerts or affect performance stats.
How To Create a Control Group
- Admin Tools > Control Groups + New
- Name the Control Group
- From the left column, click to select checks to add to the Control Group
- Add Selected > to the right column
Control Checks in Groups Manually in the App
- Admin Tools > Control Groups and select the name of the created group
- Use the Settings dropdown to apply settings to the group
We can apply these Control Group settings:
- Mute / Unmute: Toggles the notification muting feature on and off. When the check is muted, it will continue to monitor, but will not send any alerts.
- Pause / Unpause: Toggles the pausing of the check. When the check is paused, it will not run or produce any results.
- Delete: Deletes the control group.
Control Checks in Groups via the API
To utilize the API commands for Control Groups, you will just need to send a POST request to the Control Group URL and include your post_token along with any commands you wish to send.
Basic example in cURL:
```curl https://monitoring.rigor.com/control_groups/[control_group] -d post_token=[post_token] -d command=[command]
Basic HTTP POST with query strings: ```POST https://monitoring.rigor.com/control_groups/[control_group]?post_token=[post_token]&command=[command]
where [command] is one of the following:
Custom commands can perform multiple actions and we can supply any combination of mutes or pauses.
curl https://monitoring.rigor.com/control_groups/23 -d post_token=8db8f0b014b701311a3a12313d158da3 -d command=custom -d mute=false -d pause=true
will unmute and pause all checks in the group.
Note: Using the delete command via the API will delete all checks in the control group. We don’t recommend using a delete command via the API.