Browse Source

Add a prometheus datasource to grafana

main
mirsal 2 months ago
parent
commit
c4614ad874
  1. 1
      abra.sh
  2. 6
      compose.yml
  3. 10
      grafana-datasources.yml

1
abra.sh

@ -2,3 +2,4 @@ export PROMETHEUS_YML_VERSION=v1
export PROMTAIL_YML_VERSION=v1
export LOKI_YML_VERSION=v1
export NODE_EXPORTER_ENTRYPOINT_VERSION=v1
export GRAFANA_DATASOURCES_YML_VERSION=v1

6
compose.yml

@ -108,6 +108,9 @@ services:
image: grafana/grafana
volumes:
- grafana-data:/var/lib/grafana:rw
configs:
- source: grafana_datasources_yml
target: /etc/grafana/provisioning/datasources/datasources.yml
networks:
- api
- proxy
@ -145,6 +148,9 @@ configs:
template_driver: golang
name: ${STACK_NAME}_loki_yml_${LOKI_YML_VERSION}
file: loki.yml.tmpl
grafana_datasources_yml:
name: ${STACK_NAME}_grafana_datasources_yml_${GRAFANA_DATASOURCES_YML_VERSION}
file: grafana-datasources.yml
node_exporter_entrypoint_sh:
name: ${STACK_NAME}_node_exporter_entrypoint_${NODE_EXPORTER_ENTRYPOINT_VERSION}
file: node-exporter-entrypoint.sh

10
grafana-datasources.yml

@ -0,0 +1,10 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
isDefault: true
editable: false
Loading…
Cancel
Save