Skip to content

Commit ae0069f

Browse files
authored
Merge pull request #135 from GabrielSalla/create-example-monitors
Create example monitors
2 parents ba48234 + 1122d14 commit ae0069f

File tree

50 files changed

+1086
-220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1086
-220
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A Sentinela Monitor is configured through 3 main parts, along some basic setting
1616

1717
These implementations are enough for Sentinela to autonomously execute monitoring logic and automatically manages the issues.
1818

19-
![sentinela example](./docs/images/example.gif)
19+
![sentinela example](/docs/images/example.gif)
2020

2121
## Example scenario: Pending orders with completed shipments
2222
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,28 +93,29 @@ Sentinela provides a web dashboard, by default at port `8000`, with 2 sections:
9393
2. a monitor editor, where you can create and edit monitors directly from the browser
9494

9595
**Overview**
96-
![dashboard overview](./docs/images/dashboard_overview.png)
96+
![dashboard overview](/docs/images/dashboard_overview.png)
9797

9898
**Editor**
99-
![dashboard monitor editor](./docs/images/dashboard_editor.png)
99+
![dashboard monitor editor](/docs/images/dashboard_editor.png)
100100

101101
# Documentation
102-
1. [Overview](./docs/overview.md)
103-
2. [Building a Monitor](./docs/monitor.md)
104-
1. [Sample Monitor](./docs/sample_monitor.md)
105-
3. [Querying data from databases](./docs/querying.md)
106-
4. [Validating a monitor](./docs/monitor_validating.md)
107-
5. [Registering a monitor](./docs/monitor_registering.md)
102+
1. [Overview](/docs/overview.md)
103+
2. [Building a Monitor](/docs/monitor.md)
104+
1. [Monitor lifecycle](/docs/monitor_lifecycle.md)
105+
2. [Example Monitors](/docs/example_monitors.md)
106+
3. [Querying data from databases](/docs/querying.md)
107+
4. [Validating a monitor](/docs/monitor_validating.md)
108+
5. [Registering a monitor](/docs/monitor_registering.md)
108109
6. Deployment
109-
1. [Configuration](./docs/configuration.md)
110-
2. [Configuration file](./docs/configuration_file.md)
111-
3. [How to run](./docs/how_to_run.md)
112-
7. [Monitoring Sentinela](./docs/monitoring_sentinela.md)
113-
8. [Plugins](./docs/plugins/plugins.md)
114-
1. [AWS](./docs/plugins/aws.md)
115-
2. [Postgres](./docs/plugins/postgres.md)
116-
3. [Slack](./docs/plugins/slack.md)
110+
1. [Configuration](/docs/configuration.md)
111+
2. [Configuration file](/docs/configuration_file.md)
112+
3. [How to run](/docs/how_to_run.md)
113+
7. [Monitoring Sentinela](/docs/monitoring_sentinela.md)
114+
8. [Plugins](/docs/plugins/plugins.md)
115+
1. [AWS](/docs/plugins/aws.md)
116+
2. [Postgres](/docs/plugins/postgres.md)
117+
3. [Slack](/docs/plugins/slack.md)
117118
9. Interacting with Sentinela
118-
1. [HTTP server](./docs/http_server.md)
119+
1. [HTTP server](/docs/http_server.md)
119120
10. Special cases
120-
1. [Dropping issues](./docs/dropping_issues.md)
121+
1. [Dropping issues](/docs/dropping_issues.md)

configs/configs-scalable.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ plugins:
44
- postgres
55
- slack
66

7-
load_sample_monitors: true
8-
sample_monitors_path: sample_monitors
7+
load_example_monitors: true
8+
example_monitors_path: example_monitors
99
internal_monitors_path: internal_monitors
1010
internal_monitors_notification:
1111
enabled: true

configs/configs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ plugins:
44
- postgres
55
- slack
66

7-
load_sample_monitors: true
8-
sample_monitors_path: sample_monitors
7+
load_example_monitors: true
8+
example_monitors_path: example_monitors
99
internal_monitors_path: internal_monitors
1010
internal_monitors_notification:
1111
enabled: true

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COPY . /app/
1212

1313
RUN python3 -m venv $VIRTUAL_ENV \
1414
&& pip install --no-cache-dir --upgrade pip \
15-
&& pip install poetry --no-cache-dir \
15+
&& pip install --no-cache-dir poetry \
1616
&& sh tools/install_dependencies.sh
1717

1818

docker/docker-compose-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ services:
2929
- 8000:8000
3030
environment:
3131
CONFIGS_FILE: configs/configs.yaml
32-
SAMPLE_SLACK_CHANNEL: C07NCL94SDT
33-
SAMPLE_SLACK_MENTION: U07NFGGMB98
32+
EXAMPLE_SLACK_CHANNEL: C07NCL94SDT
33+
EXAMPLE_SLACK_MENTION: U07NFGGMB98
3434
SLACK_WEBSOCKET_ENABLED: true
3535
SLACK_MAIN_CHANNEL: C07NCL94SDT
3636
SLACK_MAIN_MENTION: U07NFGGMB98

docker/docker-compose-local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ services:
2424
start_period: 2s
2525
environment:
2626
CONFIGS_FILE: configs/configs.yaml
27-
SAMPLE_SLACK_CHANNEL: C07NCL94SDT
28-
SAMPLE_SLACK_MENTION: U07NFGGMB98
27+
EXAMPLE_SLACK_CHANNEL: C07NCL94SDT
28+
EXAMPLE_SLACK_MENTION: U07NFGGMB98
2929
SLACK_WEBSOCKET_ENABLED: true
3030
SLACK_MAIN_CHANNEL: C07NCL94SDT
3131
SLACK_MAIN_MENTION: U07NFGGMB98

docker/docker-compose-scalable.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ services:
3535
start_period: 2s
3636
environment:
3737
CONFIGS_FILE: configs/configs-scalable.yaml
38-
SAMPLE_SLACK_CHANNEL: C07NCL94SDT
39-
SAMPLE_SLACK_MENTION: U07NFGGMB98
38+
EXAMPLE_SLACK_CHANNEL: C07NCL94SDT
39+
EXAMPLE_SLACK_MENTION: U07NFGGMB98
4040
SLACK_WEBSOCKET_ENABLED: true
4141
SLACK_MAIN_CHANNEL: C07NCL94SDT
4242
SLACK_MAIN_MENTION: U07NFGGMB98
@@ -68,8 +68,8 @@ services:
6868
start_period: 2s
6969
environment:
7070
CONFIGS_FILE: configs/configs-scalable.yaml
71-
SAMPLE_SLACK_CHANNEL: C07NCL94SDT
72-
SAMPLE_SLACK_MENTION: U07NFGGMB98
71+
EXAMPLE_SLACK_CHANNEL: C07NCL94SDT
72+
EXAMPLE_SLACK_MENTION: U07NFGGMB98
7373
SLACK_WEBSOCKET_ENABLED: true
7474
SLACK_MAIN_CHANNEL: C07NCL94SDT
7575
SLACK_MAIN_MENTION: U07NFGGMB98

docs/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 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.
33

4-
The monitors path is also defined in the `configs.yaml` file. By default, it's set to the `sample_monitors` folder, but it can be changed to another folder if desired. The `configs.yaml` file also have other configurations that can be adjusted.
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.
55

66
# Environment variables
77
> [!IMPORTANT]

docs/configuration_file.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This document provides an overview of the configuration parameters available in
55
- `plugins`: List of strings. Plugins to be used by Sentinela. Check each plugin documentation to learn how to enable them.
66

77
## Monitors
8-
- `load_sample_monitors`: Boolean. Flag to enable the sample monitors.
9-
- `sample_monitors_path`: String. Path relative to the project root, where the sample monitors are stored.
8+
- `load_example_monitors`: Boolean. Flag to enable the example monitors.
9+
- `example_monitors_path`: String. Path relative to the project root, where the example monitors are stored.
1010
- `internal_monitors_path`: String. Path relative to the project root, where the internal monitors are stored.
1111
- `internal_monitors_notification`: Map. Settings for the notification to be sent by the internal monitors.
1212
- `enabled`: Boolean. Flag to enable the internal monitors notification.

docs/diagrams/diagrams.drawio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
<mxCell id="FxgzXEkrF_b3o0yHyvXR-78" style="edgeStyle=orthogonalEdgeStyle;rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;" parent="1" source="FxgzXEkrF_b3o0yHyvXR-79" target="FxgzXEkrF_b3o0yHyvXR-81" edge="1">
237237
<mxGeometry relative="1" as="geometry" />
238238
</mxCell>
239-
<mxCell id="FxgzXEkrF_b3o0yHyvXR-79" value="If controller is enabled, register internal and sample monitors" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;fillColor=#dae8fc;strokeColor=#6c8ebf;sketch=1;curveFitting=1;jiggle=2;fontFamily=Architects Daughter;" parent="1" vertex="1">
239+
<mxCell id="FxgzXEkrF_b3o0yHyvXR-79" value="If controller is enabled, register internal and example monitors" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;fillColor=#dae8fc;strokeColor=#6c8ebf;sketch=1;curveFitting=1;jiggle=2;fontFamily=Architects Daughter;" parent="1" vertex="1">
240240
<mxGeometry x="850" y="540" width="120" height="80" as="geometry" />
241241
</mxCell>
242242
<mxCell id="FxgzXEkrF_b3o0yHyvXR-80" style="edgeStyle=orthogonalEdgeStyle;rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;" parent="1" source="FxgzXEkrF_b3o0yHyvXR-81" target="FxgzXEkrF_b3o0yHyvXR-83" edge="1">

0 commit comments

Comments
 (0)