Created
May 10, 2020 02:45
-
-
Save KireinaHoro/8e5ba83f08b57d948b229f10d3426db6 to your computer and use it in GitHub Desktop.
Grafana + Prometheus template.
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
version: '3' | |
volumes: | |
prometheus_data: {} | |
grafana_data: {} | |
services: | |
# Prometheus backend. | |
prometheus: | |
restart: always | |
image: prom/prometheus | |
volumes: | |
- ./prometheus.yml:/etc/prometheus/prometheus.yml | |
- prometheus_data:/prometheus | |
command: | |
- '--config.file=/etc/prometheus/prometheus.yml' | |
ports: | |
- '9090:9090' | |
# Visualization. | |
grafana: | |
restart: always | |
image: grafana/grafana | |
volumes: | |
- grafana_data:/var/lib/grafana | |
environment: | |
GF_SECURITY_ADMIN_PASSWORD: defaultpassword | |
depends_on: | |
- prometheus | |
ports: | |
- '3000:3000' | |
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
global: | |
scrape_interval: 1s | |
external_labels: | |
monitor: 'my-monitor' | |
scrape_configs: | |
- job_name: 'prometheus' | |
static_configs: | |
- targets: ['localhost:9090'] | |
- job_name: 'environ-sensor' | |
static_configs: | |
- targets: ['192.168.1.16:80'] | |
labels: | |
group: 'environment-sensors' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment