From d79f77ab6e63da72fd93923b3518663044d548f2 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 13 Jul 2020 13:31:03 -0700 Subject: [PATCH] Rename to comply with Grafana plugin rules --- BUILD.md | 10 +++++----- README.md | 8 +------- dashboards/redis.json | 2 +- docker-compose.yml | 4 ++-- package.json | 2 +- provisioning/datasources/redis.yaml | 2 +- src/plugin.json | 6 +++--- 7 files changed, 14 insertions(+), 20 deletions(-) diff --git a/BUILD.md b/BUILD.md index 060743e..5d9bfe5 100644 --- a/BUILD.md +++ b/BUILD.md @@ -71,10 +71,10 @@ mage -v - Move distribution to Grafana's `plugins/` folder ```bash -mv dist/ /var/lib/grafana/plugins/grafana-redis-datasource +mv dist/ /var/lib/grafana/plugins/redis-datasource ``` -- Add `grafana-redis-datasource` to allowed unsigned plugins +- Add `redis-datasource` to allowed unsigned plugins ```bash vi /etc/grafana/grafana.ini @@ -85,7 +85,7 @@ vi /etc/grafana/grafana.ini ;enable_alpha = false ;app_tls_skip_verify_insecure = false # Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature. -allow_loading_unsigned_plugins = grafana-redis-datasource +allow_loading_unsigned_plugins = redis-datasource ``` - Verify that plugin registered @@ -96,8 +96,8 @@ tail -100 /var/log/grafana/grafana.log ``` t=2020-07-01T06:03:38+0000 lvl=info msg="Starting plugin search" logger=plugins -t=2020-07-01T06:03:38+0000 lvl=warn msg="Running an unsigned backend plugin" logger=plugins pluginID=grafana-redis-datasource pluginDir=/var/lib/grafana/plugins/grafana-redis-datasource -t=2020-07-01T06:03:38+0000 lvl=info msg="Registering plugin" logger=plugins name=grafana-redis-datasource +t=2020-07-01T06:03:38+0000 lvl=warn msg="Running an unsigned backend plugin" logger=plugins pluginID=redis-datasource pluginDir=/var/lib/grafana/plugins/redis-datasource +t=2020-07-01T06:03:38+0000 lvl=info msg="Registering plugin" logger=plugins name=redis-datasource t=2020-07-01T06:03:38+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket= ``` diff --git a/README.md b/README.md index f4fe944..4fab316 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,13 @@ -
-

Grafana Redis Datasource

-
+# Grafana Redis Datasource ![Dashboard](https://github.com/RedisTimeSeries/grafana-redis-datasource/blob/master/images/redis-dashboard.png) -
- [![Grafana 7](https://img.shields.io/badge/Grafana-7-red)](https://www.grafana.com) [![Radix](https://img.shields.io/badge/Radix-powered-blue)](https://github.com/mediocregopher/radix) [![RedisTimeSeries](https://img.shields.io/badge/RedisTimeSeries-inspired-yellowgreen)](https://oss.redislabs.com/redistimeseries/) [![Redis Enterprise](https://img.shields.io/badge/Redis%20Enterprise-supported-orange)](https://redislabs.com/redis-enterprise/) [![Go Report Card](https://goreportcard.com/badge/github.com/RedisTimeSeries/grafana-redis-datasource)](https://goreportcard.com/report/github.com/RedisTimeSeries/grafana-redis-datasource) -
- ## Summary - [**Introduction**](#introduction) diff --git a/dashboards/redis.json b/dashboards/redis.json index 9ebdead..e305a82 100644 --- a/dashboards/redis.json +++ b/dashboards/redis.json @@ -1375,7 +1375,7 @@ "multi": true, "name": "redis", "options": [], - "query": "grafana-redis-datasource", + "query": "redis-datasource", "queryValue": "", "refresh": 1, "regex": "", diff --git a/docker-compose.yml b/docker-compose.yml index 0dc2bc2..f1d99fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,9 +21,9 @@ services: - GF_AUTH_ANONYMOUS_ENABLED=true - GF_AUTH_BASIC_ENABLED=false - GF_ENABLE_GZIP=true - - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=grafana-redis-datasource + - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=redis-datasource volumes: - - ./dist:/var/lib/grafana/plugins/grafana-redis-datasource + - ./dist:/var/lib/grafana/plugins/redis-datasource - ./provisioning:/etc/grafana/provisioning - ./dashboards:/var/lib/grafana/dashboards # Uncomment to preserve Grafana configuration diff --git a/package.json b/package.json index db26ab8..71a917f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "grafana-redis-datasource", + "name": "redis-datasource", "version": "1.0.0", "description": "Grafana Redis Datasource", "scripts": { diff --git a/provisioning/datasources/redis.yaml b/provisioning/datasources/redis.yaml index d1e84cc..f3ddad2 100644 --- a/provisioning/datasources/redis.yaml +++ b/provisioning/datasources/redis.yaml @@ -2,7 +2,7 @@ apiVersion: 1 datasources: - name: Redis - type: grafana-redis-datasource + type: redis-datasource access: proxy orgId: 1 isDefault: true diff --git a/src/plugin.json b/src/plugin.json index 458987c..f6c50a8 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -1,11 +1,11 @@ { "type": "datasource", - "name": "grafana-redis-datasource", - "id": "grafana-redis-datasource", + "name": "Redis", + "id": "redis-datasource", "metrics": true, "backend": true, "alerting": true, - "executable": "gpx_grafana-redis-datasource", + "executable": "redis-datasource", "info": { "description": "Grafana Redis Datasource", "author": {