This commit is contained in:
DoTheEvo 2023-02-05 21:49:59 +01:00
parent 874e255d7e
commit 686e63da3a
1 changed files with 28 additions and 28 deletions

View File

@ -419,7 +419,7 @@ networks:
<details>
<summary>`alertmanager.yml`</summary>
```yml
```
route:
receiver: 'ntfy'
@ -433,7 +433,7 @@ receivers:
<details>
<summary>alert.rules</summary>
```yml
```
groups:
- name: host
rules:
@ -447,37 +447,37 @@ groups:
```
</details>
<details>
<summary>prometheus.yml</summary>
```yml
global:
scrape_interval: 15s
evaluation_interval: 15s
<details>
<summary>prometheus.yml</summary>
```
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'nodeexporter'
static_configs:
- targets: ['nodeexporter:9100']
scrape_configs:
- job_name: 'nodeexporter'
static_configs:
- targets: ['nodeexporter:9100']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- 'alertmanager:9093'
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- 'alertmanager:9093'
rule_files:
- '/etc/prometheus/rules/alert.rules'
```
</details>
rule_files:
- '/etc/prometheus/rules/alert.rules'
```
</details>
test:<br>
`curl -H 'Content-Type: application/json' -d '[{"labels":{"alertname":"blabla"}}]' https://alert.example.com/api/v1/alerts`