Skip to content

Commit dacf67d

Browse files
committed
update docs for internal monitor notification configs
1 parent cb8a2e3 commit dacf67d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/configuration_file.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ This document provides an overview of the configuration parameters available in
88
- `load_sample_monitors`: Boolean. Flag to enable the sample monitors.
99
- `sample_monitors_path`: String. Path relative to the project root, where the sample monitors are stored.
1010
- `internal_monitors_path`: String. Path relative to the project root, where the internal monitors are stored.
11+
- `internal_monitors_notification`: Map. Settings for the notification to be sent by the internal monitors.
12+
- `enabled`: Boolean. Flag to enable the internal monitors notification.
13+
- `notification_class`: String. Class to be used for the notification. Example: `plugin.my_plugin.notifications.SomeNotificationClass`.
14+
- `params`: Map. The desired parameters for the notification. Each notification class will have its own set of parameters. Check the documentation for each notification class to learn more about the available parameters.
1115
- `monitors_load_schedule`: String using Cron format. Schedule to reload monitors from the database.
1216

1317
## Logging
1418
- `logging.mode`: String. Logging mode. Can be "friendly" or "json".
1519
- `logging.format`: String. Settings for formatting the "friendly" logs.
16-
- `logging.fields`: Object. Fields to include in the "json" logs and their name from the `logging` module.
20+
- `logging.fields`: Map. Fields to include in the "json" logs and their name from the `logging` module.
1721

1822
Suggested configuration for `friendly` logs:
1923
```yaml
@@ -59,8 +63,8 @@ application_queue:
5963
## Controller Settings
6064
- `controller_process_schedule`: String using Cron format. Schedule to check if monitors need to be processed.
6165
- `controller_concurrency`: Integer. Number of monitors that can be processed at the same time by the Controller.
62-
- `controller_procedures`: Object. Procedures to be executed by the Controller and their settings.
63-
- `controller_procedures.monitors_stuck`: Object. Settings for the procedure to fix monitors stuck in "queued" or "running" status.
66+
- `controller_procedures`: Map. Procedures to be executed by the Controller and their settings.
67+
- `controller_procedures.monitors_stuck`: Map. Settings for the procedure to fix monitors stuck in "queued" or "running" status.
6468
- `controller_procedures.monitors_stuck.schedule`: String using Cron format. Schedule to execute the `monitors_stuck` procedure.
6569
- `controller_procedures.monitors_stuck.params.time_tolerance`: Integer. Time tolerance in seconds for a monitor to be considered as stuck. This parameter is directly impacted by the `executor_monitor_heartbeat_time` setting and the recommended value is 2 times the heartbeat time.
6670

docs/plugins/slack.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,15 @@ notification_options = [
8989
]
9090
```
9191

92+
### Using Slack notification for internal monitors
93+
To use the Slack notification for internal monitors, the settings for the `internal_monitors_notification` key in the `configs.yaml` file must be configured as follows:
94+
- `notification_class`: Should be set to `plugin.slack.notifications.SlackNotification`
95+
- `params`: Should include the desired parameters for the notification.
96+
- `channel` and `mention` will be obtained from the environment variables `SLACK_MAIN_CHANNEL` and `SLACK_MAIN_MENTION`, respectively, as specified in [Environment variables](#environment-variables).
97+
- `title` and `issues_fields` are specific to each monitor and are already defined in the internal monitors. If configured in the `params` field, they will be ignored.
98+
- `min_priority_to_send`, `min_priority_to_mention`, `mention_on_update`, and `issue_show_limit` can be set in the `params` field to customize the notification behavior. If not set, the default values will be used.
99+
100+
The provided settings will be applied to every internal and sample monitors.
101+
92102
## Services
93103
The Slack plugin includes a service that connects to the Slack websocket API to receive mentions and button press events. Any event received will queue an action to be processed by Sentinela.

0 commit comments

Comments
 (0)