Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skylinecommunications/dataminer-grafana-plugin
Grafana plugin to visualize data from a DataMiner System.
https://github.com/skylinecommunications/dataminer-grafana-plugin
grafana grafana-datasource grafana-plugin
Last synced: 10 days ago
JSON representation
Grafana plugin to visualize data from a DataMiner System.
- Host: GitHub
- URL: https://github.com/skylinecommunications/dataminer-grafana-plugin
- Owner: SkylineCommunications
- License: mit
- Created: 2022-12-13T12:55:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-15T13:42:04.000Z (about 2 years ago)
- Last Synced: 2024-11-15T08:13:39.433Z (2 months ago)
- Topics: grafana, grafana-datasource, grafana-plugin
- Language: TypeScript
- Homepage:
- Size: 479 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# DataMiner Grafana Data Source Plugin
[![Build](https://github.com/SkylineCommunications/dataminer-grafana-plugin/workflows/CI/badge.svg)](https://github.com/SkylineCommunications/dataminer-grafana-plugin/actions?query=workflow%3A%22CI%22)
[![Marketplace](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=marketplace&prefix=v&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22skylinecommunications-dataminer-datasource%22%29%5D.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/skylinecommunications-dataminer-datasource)
[![Downloads](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=downloads&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22skylinecommunications-dataminer-datasource%22%29%5D.downloads&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/skylinecommunications-dataminer-datasource)This Grafana data source plugin allows you to connect to a DataMiner agent.
For end-users: see this [read me](./src/README.md) for instructions on how to use it.
## Development
### What are Grafana data source plugins?
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.
### Getting started
#### Frontend
1. Install dependencies
```bash
yarn install
```2. Build plugin in development mode or run in watch mode
```bash
yarn dev# or
yarn watch
```3. Build plugin in production mode
```bash
yarn build
```4. Run the tests (using Jest)
```bash
# Runs the tests and watches for changes
yarn test# Exists after running all the tests
yarn lint:ci
```5. Spin up a Grafana instance and run the plugin inside it (using Docker)
```bash
yarn server
```6. Run the E2E tests (using Cypress)
```bash
# Spin up a Grafana instance first that we tests against
yarn server# Start the tests
yarn e2e
```7. Run the linter
```bash
yarn lint# or
yarn 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/docs/grafana/latest/developers/plugins/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/docs/grafana/latest/developers/plugins/sign-a-plugin/#plugin-signature-levels) 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 `
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/docs/grafana/latest/developers/plugins/metadata/)
- [How to sign a plugin?](https://grafana.com/docs/grafana/latest/developers/plugins/sign-a-plugin/)