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: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ A Sentinela Monitor is configured through 3 main parts, along some basic setting
16
16
17
17
These implementations are enough for Sentinela to autonomously execute monitoring logic and automatically manages the issues.
18
18
19
-

19
+

20
20
21
21
## Example scenario: Pending orders with completed shipments
22
22
Consider an online store where an order is expected to transition to `completed` as soon as its shipment is marked `completed`. Occasionally, inconsistencies arise: the shipment finishes but the order status remains stuck as `awaiting_delivery` or other intermediate state.
@@ -93,10 +93,10 @@ Sentinela provides a web dashboard, by default at port `8000`, with 2 sections:
93
93
2. a monitor editor, where you can create and edit monitors directly from the browser
Copy file name to clipboardExpand all lines: docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Configuration
2
-
The basic configs are set through the `configs.yaml` file. This file is read when the application starts and all the settings will be loaded. The documentation found at [Configuration file](./configuration_file.md) provides an overview of the configuration parameters available.
2
+
The basic configs are set through the `configs.yaml` file. This file is read when the application starts and all the settings will be loaded. The documentation found at [Configuration file](configuration_file.md) provides an overview of the configuration parameters available.
3
3
4
4
The monitors path is also defined in the `configs.yaml` file. By default, it's set to the `example_monitors` folder, but it can be changed to another folder if desired. The `configs.yaml` file also have other configurations that can be adjusted.
Copy file name to clipboardExpand all lines: docs/dropping_issues.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Dropping issues
2
2
In some cases, a monitor may encounter edge cases where certain issues cannot be resolved automatically. While these edge cases should be considered during monitor development, dropping issues manually can serve as a solution for unavoidable situations.
3
3
4
-
Issues can be dropped either via an [HTTP request](./http_server.md) or a [Slack message](./slack_commands.md).
4
+
Issues can be dropped either via an [HTTP request](http_server.md) or a [Slack message](slack_commands.md).
5
5
6
6
> [!IMPORTANT]
7
7
> Since dropping issues is intended only for specific scenarios, issues IDs should be manually retrieved by querying the Sentinela application database.
Copy file name to clipboardExpand all lines: docs/how_to_run.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Local execution is recommended for developing monitors. It should not be used in
54
54
55
55
When running the application locally, it is recommended to use the internal queue instead of the SQS queue for faster and smoother operation. However, it is also possible to use the AWS queue mock or a real SQS queue.
56
56
57
-
1. Set the secrets in the `.env.secrets` file and environment variables in the `docker/docker-compose-local.yml` file, as specified in the [Configuration](./configuration.md) documentation.
57
+
1. Set the secrets in the `.env.secrets` file and environment variables in the `docker/docker-compose-local.yml` file, as specified in the [Configuration](configuration.md) documentation.
58
58
2. Migrate the database to the latest version. This is only necessary when running for the first time or after updates.
59
59
```shell
60
60
make migrate-local
@@ -81,7 +81,7 @@ For a more scalable deployment, it is recommended to use separate containers for
81
81
82
82
The `docker-compose` file for this setup includes a SQS queue mock, which is used by default. However, it is also possible to use the internal queue or a real SQS queue.
83
83
84
-
1. Set the secrets in the `.env.secrets` file and environment variables in the `docker/docker-compose-scalable.yml` file, as specified in the [Configuration](./configuration.md) documentation.
84
+
1. Set the secrets in the `.env.secrets` file and environment variables in the `docker/docker-compose-scalable.yml` file, as specified in the [Configuration](configuration.md) documentation.
85
85
2. Set the `replicas` parameter in the `docker/docker-compose-scalable.yml` file to the desired number of executors.
86
86
3. Migrate the database to the latest version. This is only necessary when running for the first time or after updates.
87
87
```shell
@@ -107,7 +107,7 @@ For production deployment, it is recommended to use a more complex setup with mu
107
107
- Requires an external database and message queue.
108
108
109
109
### Building the Image
110
-
The [Dockerfile](../Dockerfile) is a starting point for building the application image. This file implements the logic to install all dependencies for the enabled plugins.
110
+
The [Dockerfile](/docker/Dockerfile) is a starting point for building the application image. This file implements the logic to install all dependencies for the enabled plugins.
111
111
112
112
1. Install the dependencies for the application and enabled plugins.
113
113
```shell
@@ -123,9 +123,9 @@ The [Dockerfile](../Dockerfile) is a starting point for building the application
123
123
### Deploying the Application
124
124
In production deployment, it is recommended to deploy the controller and executors in separate containers or pods (in the case of a Kubernetes deployment). This method requires an external queue to allow communication between the controller and executors. A persistent database is also recommended to prevent data loss.
125
125
126
-
The files provided in the [Kubernetes template](../resources/kubernetes_template) directory can be used as a reference for a Kubernetes deployment.
126
+
The files provided in the [Kubernetes template](/resources/kubernetes_template) directory can be used as a reference for a Kubernetes deployment.
127
127
128
-
All services must have the environment variables set as specified in the [Configuration](./configuration.md) documentation.
128
+
All services must have the environment variables set as specified in the [Configuration](configuration.md) documentation.
129
129
130
130
Controllers and executors can be run by specifying them as parameters when starting the application:
Copy file name to clipboardExpand all lines: docs/monitor.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Creating a new monitor
2
-
This guide will walk through the steps to set up a new Monitor. The file [monitor_template.py](../resources/monitor_template.py) serves as a template for creating a new monitor. It includes all the necessary imports and settings to get started.
2
+
This guide will walk through the steps to set up a new Monitor. The file [monitor_template.py](/resources/monitor_template.py) serves as a template for creating a new monitor. It includes all the necessary imports and settings to get started.
3
3
4
4
As a demonstration, the Monitor that will be designed is intended to **search for users with invalid registration data**, specifically when their name is empty.
5
5
@@ -290,7 +290,7 @@ result = await asyncio.to_thread(blocking_function)
290
290
# Notifications
291
291
Notifications are optional and can be configured to send notifications to different targets without needing extensive settings for ech monitor. Configure notifications by creating the `notification_options` variable with a list of the desired notifications. Each notification has it's own settings and behaviors.
292
292
293
-
Notifications are provided as plugins. Check the [plugins documentation](./plugins/plugins.md) for more information.
293
+
Notifications are provided as plugins. Check the [plugins documentation](plugins/plugins.md) for more information.
294
294
295
295
# Reactions
296
296
Reactions are optional and can be configured reactions to specific events by creating a `reaction_options` variable with an instance of the `ReactionOptions` class, available in the `monitor_utils` module.
@@ -358,7 +358,7 @@ The available events are:
358
358
The monitor utils module also provides useful functions for developing a monitor.
359
359
360
360
## Query
361
-
The `query` function allows querying data from available databases. For more details, refer to the [Querying Databases](./querying.md) documentation.
361
+
The `query` function allows querying data from available databases. For more details, refer to the [Querying Databases](querying.md) documentation.
362
362
363
363
## Read file
364
364
The `read_file` function reads files in the same directory as the monitor code, making it useful for accessing other resources that the monitor relies on, such as SQL query files.
Copy file name to clipboardExpand all lines: docs/monitor_registering.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Registering a monitor
2
2
Once the monitor code has been created, it needs to be registered on Sentinela. The process for registering a new monitor or updating an existing one is the same.
3
3
4
-

4
+

Copy file name to clipboardExpand all lines: docs/overview.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,21 +33,21 @@ The Sentinela platform comprises four main components:
33
33
- HTTP Server
34
34
- Monitors Loader
35
35
36
-

36
+

37
37
38
38
## Controller
39
39
The controller orchestrates the processing of monitors, queuing them for execution as needed.
40
40
41
41
The controller execution is demonstrated in the following diagram.
42
42
43
-

43
+

44
44
45
45
## Executor
46
46
The executor handles the actual execution of monitor routines, as well as responses to requests and events. It performs the platform’s core processing tasks and can be scaled horizontally to enhance processing capacity.
47
47
48
48
The executor execution is demonstrated in the following diagram.
49
49
50
-

50
+

51
51
52
52
The executor will wait for a message in the queue and do nothing while none are available. When a message is received, the executor will process it using the correct handler.
53
53
@@ -61,16 +61,16 @@ During the handling of a message, the executor will continuously reset the messa
61
61
## HTTP Server
62
62
As the name suggests, the HTTP server serves as an entry point for user requests and actions on the platform. While not all interactions must occur through the HTTP server, it provides a central access point for user actions.
63
63
64
-
More information can be found in the [HTTP Server](./docs/http_server.md) documentation.
64
+
More information can be found in the [HTTP Server](http_server.md) documentation.
65
65
66
66
## Monitors Loader
67
67
The monitors loader loads the monitors from the database and registers them to be used by the other components.
The monitors loader registers internal and example monitors (if configured as such) to the database. This process is only executed when the controller is enabled in the execution to make sure only one instance is trying to register the same monitors.
Copy file name to clipboardExpand all lines: docs/plugins/plugins.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ class MyNotification:
82
82
]
83
83
```
84
84
85
-
The reaction functions must follow the same structure presented in the [Monitor](../monitor.md) documentation.
85
+
The reaction functions must follow the same structure presented in the [Monitor](/docs/monitor.md) documentation.
86
86
87
87
## Services
88
88
Services are used when the plugin has some initialization or running service. An example of a running service is a websocket connection to an external provider.
@@ -139,7 +139,7 @@ __all__ = ["queues"]
139
139
```
140
140
141
141
## Pools
142
-
Plugins can provide different database pools to be used by Sentinela. Pools are a way to provide connections to databases to the monitors through a simple interface using the `query` function. More information about querying databases can be found in the [querying](../querying.md) documentation.
142
+
Plugins can provide different database pools to be used by Sentinela. Pools are a way to provide connections to databases to the monitors through a simple interface using the `query` function. More information about querying databases can be found in the [querying](/docs/querying.md) documentation.
143
143
144
144
An example of a plugin that provides the a database pool is shown below:
145
145
@@ -179,9 +179,9 @@ When the databases are being initialized, Sentinela will search for pools provid
179
179
180
180
## Built-in plugins
181
181
Sentinela comes with some built-in plugins that can be used to extend the application's functionality.
182
-
-[AWS](./aws.md)
183
-
-[Postgres](./postgres.md)
184
-
-[Slack](./slack.md)
182
+
-[AWS](aws.md)
183
+
-[Postgres](postgres.md)
184
+
-[Slack](slack.md)
185
185
186
186
## Enabling plugins
187
187
To enable a plugin, set the `plugins` field in the configuration file with the name of the desired plugins.
Copy file name to clipboardExpand all lines: docs/plugins/slack.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The Slack plugin offers an interface to interact with Sentinela through Slack. I
5
5
To enable the Slack plugin, add `slack` to the `plugins` list in the configuration file.
6
6
7
7
## Create the Slack app
8
-
First create a Slack app in your workspace. The provided app manifest [template](../resources/slack_app_manifest.yaml) has the basic configuration and permissions needed for the Sentinela Slack app.
8
+
First create a Slack app in your workspace. The provided app manifest [template](/resources/slack_app_manifest.yaml) has the basic configuration and permissions needed for the Sentinela Slack app.
9
9
10
10
## Environment variables
11
11
The following environment variables are used by the Slack plugin:
@@ -28,7 +28,7 @@ Possible buttons:
28
28
-**Lock**: Lock the alert. Visible if the alert is not already locked.
29
29
-**Solve**: Solves the alert. Visible only if the monitor’s issue settings is set as **not solvable**.
30
30
31
-

31
+

32
32
33
33
### Messages mentioning Sentinela
34
34
As a Slack app, Sentinela can also respond to direct commands sent in a message. To interact this way, mention the Sentinela app, followed by the desired action.
0 commit comments