2022-05-26 23:06:25 +08:00
|
|
|
---
|
|
|
|
aliases:
|
2022-12-10 00:36:04 +08:00
|
|
|
- ../plugins/developing/
|
2022-07-09 03:21:29 +08:00
|
|
|
description: Resources for creating Grafana plugins
|
2022-12-10 00:36:04 +08:00
|
|
|
title: Build a plugin
|
2022-05-26 23:06:25 +08:00
|
|
|
weight: 200
|
|
|
|
---
|
2020-05-07 23:45:50 +08:00
|
|
|
|
|
|
|
# Build a plugin
|
|
|
|
|
2022-06-17 03:09:16 +08:00
|
|
|
For more information on the types of plugins you can build, refer to the [Plugin Overview]({{< relref "../../administration/plugin-management/" >}}).
|
2020-05-07 23:45:50 +08:00
|
|
|
|
|
|
|
## Get started
|
|
|
|
|
2022-11-09 22:15:23 +08:00
|
|
|
The easiest way to start developing Grafana plugins is to use the Grafana [create-plugin tool](https://www.npmjs.com/package/@grafana/create-plugin).
|
2020-05-07 23:45:50 +08:00
|
|
|
|
2022-06-03 00:57:22 +08:00
|
|
|
Open the terminal, and run the following command in your [plugin directory]({{< relref "../../setup-grafana/configure-grafana/#plugins" >}}):
|
2020-05-07 23:45:50 +08:00
|
|
|
|
|
|
|
```bash
|
2022-11-09 22:15:23 +08:00
|
|
|
npx @grafana/create-plugin
|
2020-05-07 23:45:50 +08:00
|
|
|
```
|
|
|
|
|
2022-11-09 22:15:23 +08:00
|
|
|
Follow the questions and you will have a starter plugin ready to develop.
|
2022-01-17 22:58:36 +08:00
|
|
|
|
2020-05-07 23:45:50 +08:00
|
|
|
If you want a more guided introduction to plugin development, check out our tutorials:
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Build a panel plugin](/tutorials/build-a-panel-plugin/)
|
|
|
|
- [Build a data source plugin](/tutorials/build-a-data-source-plugin/)
|
2020-05-07 23:45:50 +08:00
|
|
|
|
|
|
|
## Go further
|
|
|
|
|
|
|
|
Learn more about specific areas of plugin development.
|
|
|
|
|
|
|
|
### Tutorials
|
|
|
|
|
|
|
|
If you're looking to build your first plugin, check out these introductory tutorials:
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Build a panel plugin](/tutorials/build-a-panel-plugin/)
|
|
|
|
- [Build a data source plugin](/tutorials/build-a-data-source-plugin/)
|
|
|
|
- [Build a data source backend plugin](/tutorials/build-a-data-source-backend-plugin/)
|
2020-05-07 23:45:50 +08:00
|
|
|
|
|
|
|
Ready to learn more? Check out our other tutorials:
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Build a panel plugin with D3.js](/tutorials/build-a-panel-plugin-with-d3/)
|
2020-05-07 23:45:50 +08:00
|
|
|
|
2020-05-13 05:31:36 +08:00
|
|
|
### Guides
|
|
|
|
|
|
|
|
Improve an existing plugin with one of our guides:
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Add authentication for data source plugins](/tutorials/add-authentication-for-data-source-plugins/)
|
|
|
|
- [Add support for annotations](/tutorials/add-support-for-annotations/)
|
|
|
|
- [Add support for Explore queries](/tutorials/add-support-for-explore-queries/)
|
|
|
|
- [Add support for variables](/tutorials/add-support-for-variables/)
|
|
|
|
- [Add a query editor help component](/tutorials/add-query-editor-help/)
|
|
|
|
- [Build a logs data source plugin](/tutorials/build-a-logs-data-source-plugin/)
|
|
|
|
- [Build a streaming data source plugin](/tutorials/build-a-streaming-data-source-plugin/)
|
|
|
|
- [Error handling](/tutorials/error-handling/)
|
|
|
|
- [Working with data frames](/tutorials/working-with-data-frames/)
|
|
|
|
- [Development with local Grafana](/tutorials/development-with-local-grafana/)
|
2020-05-13 05:31:36 +08:00
|
|
|
|
|
|
|
### Concepts
|
|
|
|
|
|
|
|
Deepen your knowledge through a series of high-level overviews of plugin concepts:
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Data frames](/tutorials/data-frames/)
|
2020-05-13 05:31:36 +08:00
|
|
|
|
|
|
|
### UI library
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
Explore the many UI components in our [Grafana UI library](/ui).
|
2020-05-13 05:31:36 +08:00
|
|
|
|
2020-09-25 22:47:52 +08:00
|
|
|
### Examples
|
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
For inspiration, check out our [plugin examples](/grafana/grafana-plugin-examples).
|
2020-09-25 22:47:52 +08:00
|
|
|
|
2022-11-11 01:36:59 +08:00
|
|
|
### Metadata
|
2020-05-07 23:45:50 +08:00
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Plugin metadata](/tutorials/metadata/)
|
2020-05-07 23:45:50 +08:00
|
|
|
|
2022-11-11 01:36:59 +08:00
|
|
|
### SDK
|
2020-05-07 23:45:50 +08:00
|
|
|
|
2023-01-30 20:48:12 +08:00
|
|
|
- [Grafana Plugin SDK for Go](/tutorials/backend/grafana-plugin-sdk-for-go/)
|