mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update prometheus
This commit is contained in:
parent
40c496c900
commit
d33a7d4379
19
prometheus/data/etc/prometheus.yml
Normal file
19
prometheus/data/etc/prometheus.yml
Normal 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.
0
prometheus/data/var/.gitkeep
Normal file
0
prometheus/data/var/.gitkeep
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user