-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,65 @@ | ||
# Grafana data source plugin template | ||
# Bitmovin Analytics Grafana Plugin | ||
|
||
This template is a starting point for building a Data Source Plugin for Grafana. | ||
Plugin that allows you to connect Bitmovin Analytics solution into your Grafana dashboards. | ||
|
||
## What are Grafana data source plugins? | ||
## Setup | ||
|
||
Grafana supports a wide range of data sources, including Prometheus, MySQL, and even Datadog. There’s a good chance you can already visualize metrics from the systems you have set up. In some cases, though, you already have an in-house metrics solution that you’d like to add to your Grafana dashboards. Grafana Data Source Plugins enables integrating such solutions with Grafana. | ||
Add the plugin and acquire your Bitmovin Analytics API key from the [bitmovin dashboard](https://dashboard.bitmovin.com/account). | ||
|
||
## Getting started | ||
Configure the datasource: | ||
|
||
| Setting | Value | | ||
|--------------|----------------------------------------------------------| | ||
| URL | `https://api.bitmovin.com/v1` | | ||
| API Key | Your API key | | ||
| Ad Analytics | If checked, the datasource is switched to query ads data | | ||
|
||
[//]: # (TODOMY check whether the Tenant Org Id is still relevenat...) | ||
|
||
Optionally add your `Tenant Org Id` which you can also get from [bitmovin dashboard](https://dashboard.bitmovin.com). | ||
|
||
## Time Series Graph | ||
|
||
Add a new panel and select the bitmovin analytics datasource. | ||
Configure the metric with following settings: | ||
|
||
| Setting | Description | | ||
|------------------------|------------------------------------------------------------------------------------------| | ||
| License* | Your analytics license | | ||
| Metric* | Aggregation method to use, e.g. `count`, `sum` | | ||
| Dimension* | Dimension to aggregate over | | ||
| Filter | Apply filters to the query | | ||
| Format as time series* | Check the switch to see time series data | | ||
| Group By* | Group query by dimension and plot as individual time series | | ||
| Order By | Order query ascending or descending by dimension | | ||
| Limit | Limit the result to given number | | ||
| Interval* | Time granularity of queries, select `AUTO` to automatically adapt to selected time range | | ||
| Alias By* | Set the name of series (only visible with multiple queries in one Graph) | | ||
|
||
Settings marked with `*` are required for the time series graph. | ||
|
||
### Grouped Time Series | ||
|
||
To compare e.g. impressions per browser, we provide the `Group By` attribute to group the results by specific dimensions and plot them as individual time series. Multiple `Group Bys` are supported for time series. | ||
|
||
## Tables | ||
|
||
Configure the metric as described in [Time Series Graph](#time-series-graph) but uncheck the `Format as time series` option and add a `Group By` dimension. It is recommended to add a limit (e.g. 10). | ||
|
||
## Example | ||
|
||
[//]: # (TODOMY implement the example_dashboard.) | ||
See the [example_dashboard.json](example_dashboard.json) for a demo. Configure the datasource with your Api Key and select the a license key in each panel. | ||
|
||
## Support | ||
|
||
Please refer to our [Documentation](https://developer.bitmovin.com/playback/docs/integrating-bitmovin-analytics-with-grafana) and [Analytics Api Reference](https://developer.bitmovin.com/playback/reference/overview) for more information or reach out to us at [bitmovin.com](https://bitmovin.com/contact-bitmovin/). | ||
|
||
----- | ||
|
||
## Development | ||
|
||
This project was generated with `yarn create @grafana/[email protected]`. | ||
|
||
### Frontend | ||
|
||
|
@@ -63,50 +116,3 @@ Grafana supports a wide range of data sources, including Prometheus, MySQL, and | |
|
||
yarn run lint:fix | ||
``` | ||
|
||
# Distributing your plugin | ||
|
||
When distributing a Grafana plugin either within the community or privately the plugin must be signed so the Grafana application can verify its authenticity. This can be done with the `@grafana/sign-plugin` package. | ||
|
||
_Note: It's not necessary to sign a plugin during development. The docker development environment that is scaffolded with `@grafana/create-plugin` caters for running the plugin without a signature._ | ||
|
||
## Initial steps | ||
|
||
Before signing a plugin please read the Grafana [plugin publishing and signing criteria](https://grafana.com/legal/plugins/#plugin-publishing-and-signing-criteria) documentation carefully. | ||
|
||
`@grafana/create-plugin` has added the necessary commands and workflows to make signing and distributing a plugin via the grafana plugins catalog as straightforward as possible. | ||
|
||
Before signing a plugin for the first time please consult the Grafana [plugin signature levels](https://grafana.com/legal/plugins/#what-are-the-different-classifications-of-plugins) documentation to understand the differences between the types of signature level. | ||
|
||
1. Create a [Grafana Cloud account](https://grafana.com/signup). | ||
2. Make sure that the first part of the plugin ID matches the slug of your Grafana Cloud account. | ||
- _You can find the plugin ID in the `plugin.json` file inside your plugin directory. For example, if your account slug is `acmecorp`, you need to prefix the plugin ID with `acmecorp-`._ | ||
3. Create a Grafana Cloud API key with the `PluginPublisher` role. | ||
4. Keep a record of this API key as it will be required for signing a plugin | ||
|
||
## Signing a plugin | ||
|
||
### Using Github actions release workflow | ||
|
||
If the plugin is using the github actions supplied with `@grafana/create-plugin` signing a plugin is included out of the box. The [release workflow](./.github/workflows/release.yml) can prepare everything to make submitting your plugin to Grafana as easy as possible. Before being able to sign the plugin however a secret needs adding to the Github repository. | ||
|
||
1. Please navigate to "settings > secrets > actions" within your repo to create secrets. | ||
2. Click "New repository secret" | ||
3. Name the secret "GRAFANA_API_KEY" | ||
4. Paste your Grafana Cloud API key in the Secret field | ||
5. Click "Add secret" | ||
|
||
#### Push a version tag | ||
|
||
To trigger the workflow we need to push a version tag to github. This can be achieved with the following steps: | ||
|
||
1. Run `npm version <major|minor|patch>` | ||
2. Run `git push origin main --follow-tags` | ||
|
||
## Learn more | ||
|
||
Below you can find source code for existing app plugins and other related documentation. | ||
|
||
- [Basic data source plugin example](https://github.com/grafana/grafana-plugin-examples/tree/master/examples/datasource-basic#readme) | ||
- [`plugin.json` documentation](https://grafana.com/developers/plugin-tools/reference-plugin-json) | ||
- [How to sign a plugin?](https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin) |