From f37347b7b22a5545b2f4f1ab56e238b5c2408364 Mon Sep 17 00:00:00 2001 From: Clay Smith Date: Wed, 16 Feb 2022 10:09:54 -0800 Subject: [PATCH] update readme, update plugin metadata (#98) --- .gitignore | 1 + Makefile | 4 ++++ README.md | 31 ++++++++++++++++++++++++++-- src/lightstep-datasource/plugin.json | 6 +++--- src/lightstep-graph/plugin.json | 6 +++--- src/plugin.json | 6 +++--- 6 files changed, 43 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0f14c41..8e2536f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ grafana # Test artifacts /dist +lightstep-grafana-plugin-*.zip \ No newline at end of file diff --git a/Makefile b/Makefile index 5441d58..8d1f8e4 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,10 @@ build: install $(WEBPACK) ./grafana8-workaround.sh +.PHONY: release +release: build + zip -r lightstep-grafana-plugin-release.zip dist/ README.md package.json LICENSE.md + .PHONY: test test: install $(GRUNT) mochaTest diff --git a/README.md b/README.md index 0e07dc3..bc63a80 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Lightstep Datasource for Streams -Lightstep datasource for [streams]((https://docs.lightstep.com/docs/monitor-a-service-level-indicator-with-streams)) in Grafana. Looking for Lightstep metrics? Check out the [Lightstep Metrics Datasource](https://grafana.com/grafana/plugins/lightstep-metrics-datasource/). +Lightstep datasource for [streams]((https://docs.lightstep.com/docs/monitor-a-service-level-indicator-with-streams)) in Grafana. -You can download the latest zip archive from the [Releases page](https://github.com/lightstep/lightstep-grafana-plugin/releases). Instructions for installing Grafana plugins from a packed zip archive can be found [here](https://grafana.com/docs/grafana/latest/plugins/installation). An example for provisioning the plugin with a sample datasource can be found in the `provisioning` directory of this repository. +Looking for [Lightstep metrics](https://lightstep.com/metrics/) in Grafana? Check out the [Lightstep Metrics Datasource](https://grafana.com/grafana/plugins/lightstep-metrics-datasource/). ## Requirements @@ -11,6 +11,23 @@ You can download the latest zip archive from the [Releases page](https://github. * [Lightstep streams](https://docs.lightstep.com/docs/monitor-a-service-level-indicator-with-streams) * Lightstep API Key with viewer role +## Installing + +1. Download the latest zip archive from the [Releases page](https://github.com/lightstep/lightstep-grafana-plugin/releases). + +2. Install the plugin from the zip archive, [see Grafana documentation here](https://grafana.com/docs/grafana/latest/plugins/installation). + +3. Modify the `allow_loading_unsigned_plugins` property in `grafana.ini` to the following value: + +``` +[plugins] +allow_loading_unsigned_plugins = lightstep-app,grafana-lightstep-datasource,grafana-lightstep-graph +``` + +5. [Provision the data source](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources) with your API key using `secureJsonData`. An example file for provisioning the plugin with a sample datasource can be found in the [`provisioning`](./provisioning/datasources) directory of this repository. This is a breaking change as of v1.2.0, and the Lightstep API key can no longer be set in the settings page. + +6. Restart Grafana, and login. You should see the data source you provisioned in step 5 and can use it to start creating dashboards. + ## Templating See the [Templating](https://grafana.com/docs/grafana/latest/reference/templating/) documentation for an introduction to the templating feature and the different types of template variables. @@ -26,7 +43,9 @@ The Lightstep datasource provides the following queries that you can specify in ### Using interval and range variables It's possible to use some [global built-in variables](https://grafana.com/docs/grafana/latest/reference/templating/#global-built-in-variables) in the `Resolution` field. Currently, only `$__range` and `$__interval` are supported. + ## Testing + ### Running on docker for development and testing It's possible to use the `docker-compose.yml` file in this repo to quickly install this plugin in a new instance of Grafana for development in testing. The `docker-compose.yml` configuration automatically provisions the plugin and creates a default datasource using the files in the `provisioning` directory. @@ -43,3 +62,11 @@ It's possible to use the `docker-compose.yml` file in this repo to quickly insta # grafana is now running on localhost:3000 ``` + +### Using the CLI + +``` + # Note: you will still need to manually provision the datasource and edit your grafana.ini file to allow unsigned plugins + $ make release + $ grafana-cli --pluginUrl ./lightstep-grafana-plugin-release.zip plugins install lightstep-app +``` diff --git a/src/lightstep-datasource/plugin.json b/src/lightstep-datasource/plugin.json index aed3604..aac574d 100644 --- a/src/lightstep-datasource/plugin.json +++ b/src/lightstep-datasource/plugin.json @@ -27,11 +27,11 @@ "url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md" } ], - "version": "1.4.4", - "updated": "2020-10-15" + "version": "1.2.1", + "updated": "2022-02-16" }, "dependencies": { - "grafanaVersion": "4.6.x", + "grafanaVersion": "7.4.x", "plugins": [] }, "routes": [ diff --git a/src/lightstep-graph/plugin.json b/src/lightstep-graph/plugin.json index 9312673..33c70f6 100644 --- a/src/lightstep-graph/plugin.json +++ b/src/lightstep-graph/plugin.json @@ -23,11 +23,11 @@ "url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md" } ], - "version": "1.0.4", - "updated": "2020-10-15" + "version": "1.2.1", + "updated": "2022-02-17" }, "dependencies": { - "grafanaVersion": "4.6.x", + "grafanaVersion": "7.4.x", "plugins": [] } } \ No newline at end of file diff --git a/src/plugin.json b/src/plugin.json index ecf2380..c3a6c4b 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -25,8 +25,8 @@ "url": "https://github.com/lightstep/lightstep-grafana-plugin/blob/master/LICENSE.md" } ], - "version": "1.1.6", - "updated": "2020-10-15" + "version": "1.2.1", + "updated": "2022-02-15" }, "includes": [ { @@ -39,7 +39,7 @@ } ], "dependencies": { - "grafanaDependency": "4.6.x", + "grafanaDependency": "7.4.x", "plugins": [] } } \ No newline at end of file