Added prometheus datasource preconfiguration.
parent
8e9274e132
commit
8ad94180fe
|
@ -0,0 +1,13 @@
|
|||
# Setup
|
||||
|
||||
```
|
||||
docker compose -f ./setup.yaml up -d
|
||||
docker container exec grafana_demo1-grafana-1 "/bin/bash" "-c" "mkdir -p /etc/grafana/provisioning/datasources"
|
||||
docker container cp datasources.yaml grafana_demo1-grafana-1:/etc/grafana/provisioning/datasources/prometheus.yaml
|
||||
docker compose -f ./setup.yaml down
|
||||
```
|
||||
# Actual running
|
||||
|
||||
```
|
||||
docker compose -f ./app.yaml -d
|
||||
```
|
|
@ -15,6 +15,7 @@ services:
|
|||
- '3000:3000'
|
||||
volumes:
|
||||
- 'grafana-storage:/var/lib/grafana'
|
||||
- 'grafana-provisioning:/etc/grafana/provisioning'
|
||||
networks:
|
||||
- net
|
||||
|
||||
|
@ -23,6 +24,7 @@ networks:
|
|||
driver: bridge
|
||||
|
||||
volumes:
|
||||
grafana-provisioning:
|
||||
grafana-storage:
|
||||
prometheus-data:
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
apiVersion: 1
|
||||
|
||||
deleteDatasources:
|
||||
|
||||
datasources:
|
||||
- name: prometheus
|
||||
type: prometheus
|
||||
url: http://prometheus:9090/
|
||||
isDefault: true
|
||||
jsonData:
|
||||
sslMode: "disable"
|
||||
version: 2
|
|
@ -0,0 +1,18 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
prometheus:
|
||||
image: 'nginx'
|
||||
volumes:
|
||||
- 'prometheus-data:/prometheus'
|
||||
|
||||
grafana:
|
||||
image: 'nginx'
|
||||
volumes:
|
||||
- 'grafana-storage:/var/lib/grafana'
|
||||
- 'grafana-provisioning:/etc/grafana/provisioning'
|
||||
|
||||
volumes:
|
||||
grafana-provisioning:
|
||||
grafana-storage:
|
||||
prometheus-data:
|
||||
|
Loading…
Reference in New Issue