You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration_file.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,16 @@ This document provides an overview of the configuration parameters available in
8
8
-`load_sample_monitors`: Boolean. Flag to enable the sample monitors.
9
9
-`sample_monitors_path`: String. Path relative to the project root, where the sample monitors are stored.
10
10
-`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.
11
15
-`monitors_load_schedule`: String using Cron format. Schedule to reload monitors from the database.
12
16
13
17
## Logging
14
18
-`logging.mode`: String. Logging mode. Can be "friendly" or "json".
15
19
-`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.
17
21
18
22
Suggested configuration for `friendly` logs:
19
23
```yaml
@@ -59,8 +63,8 @@ application_queue:
59
63
## Controller Settings
60
64
- `controller_process_schedule`: String using Cron format. Schedule to check if monitors need to be processed.
61
65
- `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.
64
68
- `controller_procedures.monitors_stuck.schedule`: String using Cron format. Schedule to execute the `monitors_stuck` procedure.
65
69
- `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.
Copy file name to clipboardExpand all lines: docs/plugins/slack.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,8 @@ The following environment variables are used by the Slack plugin:
12
12
-`SLACK_TOKEN`: The token used to send messages to Slack. This token is generated when you create your Slack app and install it in your workspace. Example: `xoxb-1234567890-1234567890123-12345678901234567890abcdef`.
13
13
-`SLACK_WEBSOCKET_ENABLED`: A flag to enable or disable the websocket connection for receiving events from Slack. Set this to `true` to enable the websocket or `false` to disable it. Defaults to `false`.
14
14
-`SLACK_APP_TOKEN`: The token used to start the websocket connection for receiving events from interactions with the Sentinela Slack app. This token is generated when you create your Slack app and enable the Socket Mode. Example: `xapp-1234567890-1234567890123-12345678901234567890abcdef`.
15
-
-`SAMPLE_SLACK_CHANNEL`: The Slack channel where notifications for **sample monitors** will be sent. Example: `C0011223344`.
16
-
-`SAMPLE_SLACK_MENTION`: The Slack user or group to mention in notifications for **sample monitors**. Example: `U0011223344`.
17
-
-`SLACK_MAIN_CHANNEL`: The Slack channel where notifications for **internal monitors** will be sent. Example: `C0011223344`.
18
-
-`SLACK_MAIN_MENTION`: The Slack user or group to mention in notifications for **internal monitors**. Example: `U0011223344`.
15
+
-`SLACK_MAIN_CHANNEL`: The Slack channel where notifications for **internal monitors** and **sample monitors** will be sent. Example: `C0011223344`.
16
+
-`SLACK_MAIN_MENTION`: The Slack user or group to mention in notifications for **internal monitors** and **sample monitors**. Example: `U0011223344`.
19
17
20
18
## Slack commands
21
19
Sentinela provides two main ways to interact through Slack:
@@ -91,5 +89,15 @@ notification_options = [
91
89
]
92
90
```
93
91
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
+
94
102
## Services
95
103
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