Added boilerplate for Prometheus

This commit is contained in:
2022-08-27 16:04:27 +02:00
parent 092cbcfdd1
commit 6db423d170
5 changed files with 63 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
groups:
- name: DemoAlerts
rules:
- alert: InstanceDown
expr: up{job="services"} < 1
for: 5m

View File

@@ -0,0 +1,17 @@
global:
scrape_interval: 30s
scrape_timeout: 10s
rule_files:
- alert.yml
scrape_configs:
- job_name: services
metrics_path: /metrics
static_configs:
- targets:
- 'prometheus:9090'
- job_name: 'file_ds'
file_sd_configs:
- files:
- targets.json

View File

@@ -0,0 +1,10 @@
[
{
"targets": [
"api:9091"
],
"labels": {
"job": "5f11-api"
}
}
]