From 02af8300f60f6341b319e98bec1ccc0d5a5d7fcb Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sun, 6 Mar 2022 00:34:51 +0100 Subject: [PATCH] feat: provision redis plugin and redis datasource config --- config/grafana.env.dist | 2 +- docker-compose.yml | 2 ++ grafana/provisioning/datasources/redis.yml | 29 ++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 grafana/provisioning/datasources/redis.yml diff --git a/config/grafana.env.dist b/config/grafana.env.dist index 8ee091d..e7dc832 100644 --- a/config/grafana.env.dist +++ b/config/grafana.env.dist @@ -1,4 +1,4 @@ # Grafana options GF_SECURITY_ADMIN_USER=admin GF_SECURITY_ADMIN_PASSWORD=admin -GF_INSTALL_PLUGINS= +GF_INSTALL_PLUGINS=redis-app diff --git a/docker-compose.yml b/docker-compose.yml index ee04942..ccba0d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,8 @@ services: image: grafana/grafana:8.4.1 depends_on: - influxdb + links: + - redis env_file: config/grafana.env ports: - '3000:3000' diff --git a/grafana/provisioning/datasources/redis.yml b/grafana/provisioning/datasources/redis.yml new file mode 100644 index 0000000..f005ae2 --- /dev/null +++ b/grafana/provisioning/datasources/redis.yml @@ -0,0 +1,29 @@ +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Redis + orgId: 1 + +# list of datasources to insert/update depending +# whats available in the database +datasources: + # name of the datasource. Required +- name: Redis + # datasource type. Required + type: redis-datasource + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: redis://redis:6379 + version: 1 + jsonData: + client: standalone + poolSize: 5 + timeout: 10 + pingInterval: 0 + pipelineWindow: 0 + editable: false