- Rename directories like the volumes.
- Add Grafana dashboard provisioning, and split off config. It was weird
to mount the same directory under two different paths.
- Now arbitrary dashboards can be put into
grafana-provisioning/dashboards/*.json and they will be automatically
deployed.
+++ /dev/null
-apiVersion: 1
-datasources:
-- name: Prometheus
- type: prometheus
- url: http://localhost:9090
- isDefault: true
- access: proxy
- editable: true
+++ /dev/null
-[auth.anonymous]
-# enable anonymous access
-enabled = true
+++ /dev/null
-global:
- scrape_interval: 5s
- scrape_timeout: 5s
- evaluation_interval: 15s
-alerting:
- alertmanagers:
- - static_configs:
- - targets: []
- scheme: http
- timeout: 10s
- api_version: v1
-scrape_configs:
-- job_name: 'prometheus'
- static_configs:
- - targets: ['localhost:9090']
-
-- job_name: host-http
- honor_timestamps: true
- metrics_path: /metrics
- scheme: http
- static_configs:
- - targets: ['localhost:8080']
--- /dev/null
+[auth.anonymous]
+# enable anonymous access
+enabled = true
--- /dev/null
+apiVersion: 1
+providers:
+ - name: default
+ options:
+ path: /etc/grafana/provisioning
--- /dev/null
+apiVersion: 1
+datasources:
+- name: Prometheus
+ type: prometheus
+ url: http://localhost:9090
+ isDefault: true
+ access: proxy
+ editable: true
- name: grafana-config
mountPath: /grafana-config
readOnly: true
- name: grafana-config
mountPath: /grafana-config
readOnly: true
- - name: grafana-datasource
- mountPath: /etc/grafana/provisioning/datasources/datasource.yaml
+ - name: grafana-provisioning
+ mountPath: /etc/grafana/provisioning
readOnly: true
- image: quay.io/prometheus/prometheus:latest
readOnly: true
- image: quay.io/prometheus/prometheus:latest
- path: ./conf-grafana/datasource.yaml
- type: File
- name: grafana-datasource
+ path: ./grafana-provisioning
+ name: grafana-provisioning
name: grafana-config
- hostPath:
name: grafana-config
- hostPath:
- path: ./conf-prometheus
+ path: ./prometheus-config
name: prometheus-config
- hostPath:
path: ./http
name: prometheus-config
- hostPath:
path: ./http
--- /dev/null
+global:
+ scrape_interval: 5s
+ scrape_timeout: 5s
+ evaluation_interval: 15s
+alerting:
+ alertmanagers:
+ - static_configs:
+ - targets: []
+ scheme: http
+ timeout: 10s
+ api_version: v1
+scrape_configs:
+- job_name: 'prometheus'
+ static_configs:
+ - targets: ['localhost:9090']
+
+- job_name: host-http
+ honor_timestamps: true
+ metrics_path: /metrics
+ scheme: http
+ static_configs:
+ - targets: ['localhost:8080']