add docker-compose/prometheus sample

This commit is contained in:
Piotr Dobrowolski 2020-04-02 00:17:37 +02:00
parent 17986590d6
commit a8ac06189d
2 changed files with 27 additions and 0 deletions

19
docker-compose.yml Normal file
View File

@ -0,0 +1,19 @@
version: "3.3"
services:
exporter:
build: .
ports:
- 8888:8888
command: python3 -u /usr/src/process.py rtsp://ubnt:ubnt@10.8.0.124:554/live/ch00_0
restart: always
prometheus:
image: prom/prometheus:v2.17.1
volumes:
- ./prometheus.yml:/prometheus/prometheus.yml
command:
- '--config.file=/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: always

8
prometheus.yml Normal file
View File

@ -0,0 +1,8 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: sztancarka
static_configs:
- targets: ["exporter:8888"]