Deploy `Grafana` provision data for Datasources.
This commit is contained in:
parent
6369b92026
commit
506a63697c
|
@ -0,0 +1,25 @@
|
|||
# # config file version
|
||||
apiVersion: 1
|
||||
|
||||
# # list of datasources that should be deleted from the database
|
||||
deleteDatasources:
|
||||
- name: Loki
|
||||
orgId: 1
|
||||
|
||||
# # list of datasources to insert/update depending
|
||||
# # on what's available in the database
|
||||
datasources:
|
||||
# <string, required> name of the datasource. Required
|
||||
- name: Loki
|
||||
# <string, required> datasource type. Required
|
||||
type: loki
|
||||
# <string, required> access mode. direct or proxy. Required
|
||||
access: proxy
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string> url
|
||||
url: http://localhost:3100
|
||||
version: 1
|
||||
# <bool> allow users to edit datasources from the UI.
|
||||
editable: false
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# # config file version
|
||||
apiVersion: 1
|
||||
|
||||
# # list of datasources that should be deleted from the database
|
||||
deleteDatasources:
|
||||
- name: Prometheus
|
||||
orgId: 1
|
||||
|
||||
# # list of datasources to insert/update depending
|
||||
# # on what's available in the database
|
||||
datasources:
|
||||
# <string, required> name of the datasource. Required
|
||||
- name: Prometheus
|
||||
# <string, required> datasource type. Required
|
||||
type: prometheus
|
||||
# <string, required> access mode. direct or proxy. Required
|
||||
access: proxy
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string> url
|
||||
url: http://localhost:9090
|
||||
version: 1
|
||||
# <bool> allow users to edit datasources from the UI.
|
||||
editable: false
|
||||
|
|
@ -7,6 +7,14 @@
|
|||
end
|
||||
end
|
||||
|
||||
%w(loki.yaml prometheus.yaml).each do |conf|
|
||||
remote_file "/etc/grafana/provisioning/datasources/#{conf}" do
|
||||
owner 'root'
|
||||
group 'grafana'
|
||||
mode '640'
|
||||
end
|
||||
end
|
||||
|
||||
# Start/Enable `grafana`:
|
||||
service 'grafana-server' do
|
||||
action [ :enable, :start ]
|
||||
|
|
Loading…
Reference in New Issue