Logomotion: Volet sécurité des applications Web, métrologie / prometheus
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
version: '2'
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
volumes:
|
||||
- ./etc/prometheus:/etc/prometheus
|
||||
ports:
|
||||
- 9090:9090
|
||||
alertmanager:
|
||||
image: prom/alertmanager
|
||||
volumes:
|
||||
- ./etc/alertmanager:/etc/alertmanager
|
||||
ports:
|
||||
- 9093:9093
|
||||
faketools:
|
||||
image: bornholm/faketools
|
||||
ports:
|
||||
- 8080:8080
|
@ -0,0 +1,14 @@
|
||||
global:
|
||||
smtp_smarthost: 'faketools:2525'
|
||||
smtp_from: 'alertmanager@my.org'
|
||||
smtp_auth_username: 'alertmanager'
|
||||
smtp_auth_password: 'password'
|
||||
smtp_require_tls: false
|
||||
|
||||
route:
|
||||
receiver: dev-team
|
||||
|
||||
receivers:
|
||||
- name: 'dev-team'
|
||||
email_configs:
|
||||
- to: 'dev-team@my.org'
|
@ -0,0 +1,20 @@
|
||||
# Configuration de l'application sur laquelle
|
||||
# Prometheus doit récolter des informations
|
||||
|
||||
scrape_configs:
|
||||
- job_name: demoapp
|
||||
scrape_interval: 10s
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets: [ "172.17.0.1:3000" ]
|
||||
|
||||
# Configuration de l'alertmanager
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: [ "alertmanager:9093" ]
|
||||
|
||||
# Définition des règles d'alertes
|
||||
rule_files:
|
||||
- "/etc/prometheus/rules.d/*.yml"
|
@ -0,0 +1,6 @@
|
||||
groups:
|
||||
- name: hello-world
|
||||
rules:
|
||||
- alert: HelloWorldAlert
|
||||
expr: demoapp_hello_world > 5
|
||||
for: 10s
|
Reference in New Issue
Block a user