Skip to content

Commit

Permalink
update readme, update plugin metadata (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clay Smith authored Feb 16, 2022
1 parent 4b105bd commit f37347b
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ grafana

# Test artifacts
/dist
lightstep-grafana-plugin-*.zip
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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
```
6 changes: 3 additions & 3 deletions src/lightstep-datasource/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
6 changes: 3 additions & 3 deletions src/lightstep-graph/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
}
6 changes: 3 additions & 3 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -39,7 +39,7 @@
}
],
"dependencies": {
"grafanaDependency": "4.6.x",
"grafanaDependency": "7.4.x",
"plugins": []
}
}

0 comments on commit f37347b

Please sign in to comment.