mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
deployment: separate datasource between single and cluster versions (#7119)
Before, single and cluster deployments were provisioned with both Grafana datasources: single and cluster. But this resulted into a problem: single DS didn't work for cluster and vice versa. See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7113 This PR splits datasource file into 2 files: single and cluster. Now, these files are separately provisioned to single and cluster deployments correspondingly. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
e62b88b2e0
commit
fd890a2771
@ -28,7 +28,7 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/prometheus-datasource:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/datasources/prometheus-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./../../dashboards/victoriametrics-cluster.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
|
||||
|
@ -53,7 +53,7 @@ services:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/prometheus-datasource:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/datasources/prometheus-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
|
||||
|
@ -1,20 +1,11 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://victoriametrics:8428
|
||||
isDefault: true
|
||||
jsonData:
|
||||
prometheusType: Prometheus
|
||||
prometheusVersion: 2.24.0
|
||||
|
||||
- name: VictoriaMetrics - cluster
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://vmauth:8427/select/0/prometheus
|
||||
isDefault: false
|
||||
isDefault: true
|
||||
jsonData:
|
||||
prometheusType: Prometheus
|
||||
prometheusVersion: 2.24.0
|
@ -0,0 +1,11 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://victoriametrics:8428
|
||||
isDefault: true
|
||||
jsonData:
|
||||
prometheusType: Prometheus
|
||||
prometheusVersion: 2.24.0
|
@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics - cluster
|
||||
type: victoriametrics-datasource
|
||||
access: proxy
|
||||
url: http://vmauth:8427/select/0/prometheus
|
||||
isDefault: true
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://vmauth:8427 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8427/select/0/vmui
|
@ -0,0 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics
|
||||
type: victoriametrics-datasource
|
||||
access: proxy
|
||||
url: http://victoriametrics:8428
|
||||
isDefault: true
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://victoriametrics:8428 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8428/vmui
|
@ -1,46 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
# List of data sources to insert/update depending on what's
|
||||
# available in the database.
|
||||
datasources:
|
||||
# <string, required> Name of the VictoriaMetrics datasource
|
||||
# displayed in Grafana panels and queries.
|
||||
- name: VictoriaMetrics
|
||||
# <string, required> Sets the data source type.
|
||||
type: victoriametrics-datasource
|
||||
# <string, required> Sets the access mode, either
|
||||
# proxy or direct (Server or Browser in the UI).
|
||||
# Some data sources are incompatible with any setting
|
||||
# but proxy (Server).
|
||||
access: proxy
|
||||
# <string> Sets default URL of the single node version of VictoriaMetrics
|
||||
url: http://victoriametrics:8428
|
||||
# <string> Sets the pre-selected datasource for new panels.
|
||||
# You can set only one default data source per organization.
|
||||
isDefault: true
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://victoriametrics:8428 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8428/vmui
|
||||
|
||||
# <string, required> Name of the VictoriaMetrics datasource
|
||||
# displayed in Grafana panels and queries.
|
||||
- name: VictoriaMetrics - cluster
|
||||
# <string, required> Sets the data source type.
|
||||
type: victoriametrics-datasource
|
||||
# <string, required> Sets the access mode, either
|
||||
# proxy or direct (Server or Browser in the UI).
|
||||
# Some data sources are incompatible with any setting
|
||||
# but proxy (Server).
|
||||
access: proxy
|
||||
# <string> Sets default URL of the cluster version of VictoriaMetrics
|
||||
url: http://vmauth:8427/select/0/prometheus
|
||||
# <string> Sets the pre-selected datasource for new panels.
|
||||
# You can set only one default data source per organization.
|
||||
isDefault: false
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://vmauth:8427 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8427/select/0/vmui
|
@ -8,7 +8,7 @@ services:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-datasource:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/datasources/victoriametrics-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./provisioning/plugins/:/var/lib/grafana/plugins
|
||||
- ./../../dashboards/vm/victoriametrics-cluster.json:/var/lib/grafana/dashboards/vm.json
|
||||
|
@ -8,7 +8,7 @@ services:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-datasource:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/datasources/victoriametrics-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./provisioning/plugins/:/var/lib/grafana/plugins
|
||||
- ./../../dashboards/vm/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
||||
|
Loading…
Reference in New Issue
Block a user