diff --git a/speedweb/Dockerfile b/speedweb/Dockerfile index fbdd099..ada5f66 100644 --- a/speedweb/Dockerfile +++ b/speedweb/Dockerfile @@ -1,8 +1,8 @@ FROM grafana/grafana MAINTAINER Pedro César de Azevedo -COPY conf/grafana.db /var/lib/grafana/grafana.db COPY conf/home.json /usr/share/grafana/public/dashboards/home.json +COPY provisioning/ /etc/grafana/provisioning ENV GF_SERVER_ROOT_URL http://localhost ENV GF_SECURITY_ADMIN_PASSWORD admin diff --git a/speedweb/conf/grafana.db b/speedweb/conf/grafana.db deleted file mode 100644 index 47c2288..0000000 Binary files a/speedweb/conf/grafana.db and /dev/null differ diff --git a/speedweb/provisioning/datasources/datasource.yml b/speedweb/provisioning/datasources/datasource.yml new file mode 100644 index 0000000..dbaad74 --- /dev/null +++ b/speedweb/provisioning/datasources/datasource.yml @@ -0,0 +1,50 @@ +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: InfluxDB + orgId: 1 + +# list of datasources to insert/update depending +# whats available in the database +datasources: + # name of the datasource. Required +- name: InfluxDB + # datasource type. Required + type: influxdb + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://db:8086 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: speedtest + # enable/disable basic auth + basicAuth: false + # basic auth username + basicAuthUser: + # basic auth password + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "" + tlsClientCert: "" + tlsClientKey: "" + version: 1 + # allow users to edit datasources from the UI. + editable: true \ No newline at end of file