[add] prometheus
This commit is contained in:
parent
a7ab015384
commit
f92b76f266
4 changed files with 37 additions and 1 deletions
6
prometheus/config/alert.yml
Normal file
6
prometheus/config/alert.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
groups:
|
||||
- name: DemoAlerts
|
||||
rules:
|
||||
- alert: InstanceDown
|
||||
expr: up{job="services"} < 1
|
||||
for: 5m
|
15
prometheus/config/prometheus.yml
Normal file
15
prometheus/config/prometheus.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
global:
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
|
||||
rule_files:
|
||||
- alert.yml
|
||||
|
||||
scrape_configs:
|
||||
- job_name: services
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets:
|
||||
- 'prometheus:9090'
|
||||
- 'idonotexists:564'
|
||||
|
15
prometheus/docker-compose.yml
Normal file
15
prometheus/docker-compose.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.34.0
|
||||
ports:
|
||||
- 9000:9090
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus
|
||||
- prometheus-data:/prometheus
|
||||
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
|
||||
|
||||
|
||||
volumes:
|
||||
prometheus-data:
|
|
@ -2,7 +2,7 @@ version: '3'
|
|||
|
||||
services:
|
||||
tiddly:
|
||||
image: tiddlywiki:5.2.0
|
||||
image: tiddlywiki:5.2.2
|
||||
build: .
|
||||
container_name: tiddlywiki-docker
|
||||
restart: unless-stopped
|
||||
|
|
Loading…
Add table
Reference in a new issue