1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

update prometheus

This commit is contained in:
kev 2021-11-29 11:35:32 +08:00
parent 40c496c900
commit d33a7d4379
4 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,19 @@
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']

Binary file not shown.

View File

View File

@ -1,9 +1,15 @@
version: "3.7"
version: "3.8"
services:
prometheus:
image: prom/prometheus
image: prom/prometheus:v2.31.1
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/var/lib/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- "9090:9090"
volumes:
- ./data:/etc/prometheus
- ./data/etc:/etc/prometheus
- ./data/var:/var/lib/prometheus
restart: unless-stopped