Skip to content

Commit e3282f6

Browse files
authored
Merge pull request #361 from Infra-Red/grafana-datasources
Allow to provision additional Grafana datasources
2 parents 29fd793 + 9ef7952 commit e3282f6

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

jobs/grafana/spec

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ templates:
1818
config/provisioning/dashboards/folders.yml: config/provisioning/dashboards/folders.yml
1919
config/provisioning/datasources/influxdb.yml: config/provisioning/datasources/influxdb.yml
2020
config/provisioning/datasources/prometheus.yml: config/provisioning/datasources/prometheus.yml
21+
config/provisioning/datasources/custom.yml: config/provisioning/datasources/custom.yml
2122
config/database_tls_client_ca.pem: config/database_tls_client_ca.pem
2223
config/database_tls_client_cert.pem: config/database_tls_client_cert.pem
2324
config/database_tls_client_key.pem: config/database_tls_client_key.pem
@@ -687,7 +688,12 @@ properties:
687688
description: "InfluxDB user to configure as Grafana data source"
688689
grafana.influxdb.password:
689690
description: "InfluxDB password to configure as Grafana data source"
690-
691+
692+
grafana.datasources.create:
693+
description: "List of datasources in YAML format that Grafana will add or update during start up"
694+
grafana.datasources.delete:
695+
description: "List of datasources in YAML format that Grafana will delete before inserting/updating those in create list"
696+
691697
env.http_proxy:
692698
description: "HTTP proxy to use"
693699
env.https_proxy:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# config file version
2+
apiVersion: 1
3+
4+
# list of datasources that should be deleted from the database
5+
deleteDatasources: <%= p('grafana.datasources.delete', []).to_json %>
6+
7+
# list of datasources to insert/update depending
8+
# what's available in the database
9+
datasources: <%= p('grafana.datasources.create', []).to_json %>

0 commit comments

Comments
 (0)