Last active
November 1, 2021 08:54
-
-
Save making/037c5088a29c8dd8c46e11385bc6c69a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:sha256", "sha256") | |
#@ load("@ytt:data", "data") | |
--- | |
version: "3" | |
services: | |
monitoring-config: | |
image: hairyhenderson/gomplate:v3.10.0-alpine | |
container_name: monitoring-config | |
entrypoint: ["/bin/sh","-c"] | |
command: | |
- gomplate -i '{{ tmpl.Inline .Env.CONFIG }}' -o /etc/prometheus/prometheus.yml | |
environment: | |
CONFIG: #@ data.read("prometheus.yml") | |
volumes: | |
- /docker/docker-data/prometheus/conf:/etc/prometheus | |
prometheus: | |
image: prom/prometheus:latest | |
container_name: prometheus | |
depends_on: | |
- monitoring-config | |
volumes: | |
- /docker/docker-data/prometheus/conf:/etc/prometheus | |
command: | |
- '--config.file=/etc/prometheus/prometheus.yml' | |
- '--storage.tsdb.path=/prometheus' | |
- '--storage.tsdb.retention.time=200h' | |
- '--web.enable-lifecycle' | |
labels: | |
checkusum: #@ sha256.sum(data.read("prometheus.yml")) | |
restart: unless-stopped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
global: | |
scrape_interval: 15s | |
evaluation_interval: 15s | |
alerting: | |
alertmanagers: | |
- static_configs: | |
- targets: | |
- alertmanager:9093 | |
scrape_configs: | |
- job_name: 'prometheus' | |
static_configs: | |
- targets: ['prometheus:9090'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment