From a8ac06189dfeabd8c77932dff3848bc9e2cc81d4 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Thu, 2 Apr 2020 00:17:37 +0200 Subject: [PATCH] add docker-compose/prometheus sample --- docker-compose.yml | 19 +++++++++++++++++++ prometheus.yml | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 docker-compose.yml create mode 100644 prometheus.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0165f82 --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..2a61e6b --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,8 @@ +global: + scrape_interval: 15s + evaluation_interval: 15s + +scrape_configs: +- job_name: sztancarka + static_configs: + - targets: ["exporter:8888"]