From 4cabc612e7894d396b7580f1571e9e43b9dfb2c2 Mon Sep 17 00:00:00 2001 From: Joe Perez Date: Sun, 17 Mar 2024 16:54:28 -0700 Subject: [PATCH 01/11] Enhance datasource READMEs --- examples/datasource-basic/README.md | 15 ++--- examples/datasource-http-backend/README.md | 33 ++++++++-- examples/datasource-http/README.md | 63 ++++++++++++++++++- examples/datasource-logs/README.md | 54 +++++++++++++++- .../README.md | 25 +++++--- .../datasource-streaming-websocket/README.md | 18 +++++- examples/panel-datalinks/README.md | 2 + 7 files changed, 182 insertions(+), 28 deletions(-) diff --git a/examples/datasource-basic/README.md b/examples/datasource-basic/README.md index a598fe37d..c9232515d 100644 --- a/examples/datasource-basic/README.md +++ b/examples/datasource-basic/README.md @@ -1,16 +1,17 @@ -# Grafana Basic Data Source Plugin example +# Basic Data Source Plugin for Grafana [![Build](https://github.com/grafana/grafana-starter-datasource/workflows/CI/badge.svg)](https://github.com/grafana/grafana-starter-datasource/actions?query=workflow%3A%22CI%22) -This template is a starting point for building Grafana data source plugins. +This repository contains a simple data source plugin example. +## Overview -## What is a Grafana data source plugin? +The Basic Data Source Plugin offers a streamlined starting point for developers to understand the essential structure and functionality required for adding their own data sources to Grafana. -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 enable you to integrate such solutions with Grafana. +Grafana supports a wide range of data sources, including Prometheus, MySQL, and 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 enable you to integrate such solutions with Grafana. ## Get started -A data source backend plugin consists of both frontend and backend components. +Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. ### Frontend @@ -34,7 +35,7 @@ A data source backend plugin consists of both frontend and backend components. ### Backend -1. Update [Grafana plugin SDK for Go](https://grafana.com/developers/plugin-tools/introduction/grafana-plugin-sdk-for-go) dependency to the latest minor version: +1. Update [Grafana Plugin SDK for Go](https://grafana.com/developers/plugin-tools/introduction/grafana-plugin-sdk-for-go) dependency to the latest minor version: ```bash go get -u github.com/grafana/grafana-plugin-sdk-go @@ -57,4 +58,4 @@ A data source backend plugin consists of both frontend and backend components. - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) -- [Grafana UI Library](https://developers.grafana.com/ui) - UI components to help you build interfaces using Grafana Design System +- [Grafana documentation](https://grafana.com/docs/) diff --git a/examples/datasource-http-backend/README.md b/examples/datasource-http-backend/README.md index dd18fa278..fdec845f9 100644 --- a/examples/datasource-http-backend/README.md +++ b/examples/datasource-http-backend/README.md @@ -1,14 +1,20 @@ -# Grafana Data Source HTTP Backend Plugin example +# Data Source HTTP Backend Plugin for Grafana + +This repository contains a backend data source plugin that queries data from an HTTP API. + +## Overview + +The Data Source HTTP Backend Plugin showcases the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers aiming to incorporate HTTP-based data sources into their Grafana dashboards. This example queries data from an HTTP API. The HTTP API returns data in JSON format, which is then converted to data frames. -This differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than going through Grafana's data source HTTP proxy. +This plugin differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than going through Grafana's data source HTTP proxy. This allows the plugin to use the data source for alerting as well, as the queries are executed on the backend. This plugin example also showcases other features and best-practices of backend plugins: -- Using the `httpclient` provided by the [Grafana plugins SDK](https://pkg.go.dev/github.com/grafana/grafana-plugin-sdk-go/backend/httpclient) +- Using the `httpclient` provided by the [Grafana Plugin SDK for Go](https://pkg.go.dev/github.com/grafana/grafana-plugin-sdk-go/backend/httpclient) - Tracing, for better instrumentation of your plugin This plugin example also includes an example server returning data in the format expected by this plugin (`cmd/server`). Refer to the section below on how to build and run it. @@ -28,10 +34,14 @@ The plugin expects the following JSON from a remote HTTP API: An example HTTP server that returns dummy data in this format is included in `cmd/server`. -## Building +## Get started + +Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. ### Frontend +Install dependencies and build: + ```bash $ npm install $ npm run build @@ -39,11 +49,16 @@ $ npm run build ### Backend +Build backend plugin binaries for Linux, Windows and Darwin: + ```bash $ mage -v ``` -### Example server +### Set up a server + +1. Set up a backend server: + ```bash $ mage server @@ -51,8 +66,14 @@ $ ./cmd/server/server :10000 2022/10/28 15:43:16 listening on :10000 ``` -Then, add a new data source in Grafana and use the following URL: +2. Add a new data source in Grafana and use the following URL: ``` http://127.0.0.1:10000/metrics ``` + +## Learn more + +- [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) +- [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-http/README.md b/examples/datasource-http/README.md index 363029e77..c132d8061 100644 --- a/examples/datasource-http/README.md +++ b/examples/datasource-http/README.md @@ -1,3 +1,62 @@ -# Grafana Data Source Plugin HTTP example +# Basic Data Source HTTP Plugin for Grafana -This example queries data from an HTTP API. +This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. +## Overview + +The Grafana HTTP Backend Data Source Plugin shows the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate HTTP-based data sources into their Grafana dashboards. + +Grafana supports a wide range of data sources, including Prometheus, MySQL, and 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 enable you to integrate such solutions with Grafana. + +This plugin differs from the `datasource-http-backend` example because the data fetching happens through Grafana's data source HTTP proxy rather than going through the plugin backend. + +## Get started + +Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. + +### Frontend + +1. Install dependencies: + + ```bash + npm install + ``` + +2. Build plugin in development mode or run in watch mode: + + ```bash + npm run dev + ``` + +3. Build plugin in production mode: + + ```bash + npm run build + ``` + +### Backend + +1. Update [Grafana Plugin SDK for Go](https://grafana.com/developers/plugin-tools/introduction/grafana-plugin-sdk-for-go) dependency to the latest minor version: + + ```bash + go get -u github.com/grafana/grafana-plugin-sdk-go + go mod tidy + ``` + +2. Build backend plugin binaries for Linux, Windows and Darwin: + + ```bash + mage -v + ``` + +3. List all available Mage targets for additional commands: + + ```bash + mage -l + ``` + + +## Learn more + +- [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) +- [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-logs/README.md b/examples/datasource-logs/README.md index 24466369c..7161c3e41 100644 --- a/examples/datasource-logs/README.md +++ b/examples/datasource-logs/README.md @@ -1,3 +1,53 @@ -# Grafana Data Source Plugin with Logs example +# Logs Data Source Plugin for Grafana -This is an example of a data source plugin that implements logging features. You can learn more in our [documentation](https://grafana.com/developers/plugin-tools/tutorials/build-a-logs-data-source-plugin). \ No newline at end of file +This repository contains a data source plugin with logs. + +## Overview + +The Logs Data Source Plugin demonstrates the integration of log data sources into Grafana dashboards. This plugin serves as an example for developers who want to incorporate log data from various sources into their Grafana visualizations. + +This is an example of a data source plugin that implements logging features. You can learn more in our [documentation](https://grafana.com/developers/plugin-tools/tutorials/build-a-logs-data-source-plugin). + +## Get started + +Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. + +### Frontend + +Install dependencies and build: + +```bash +$ npm install +$ npm run build +``` + +### Backend + +Build backend plugin binaries for Linux, Windows and Darwin: + +```bash +$ mage -v +``` + +### Set up a server + +1. Set up a backend server: + + +```bash +$ mage server +$ ./cmd/server/server :10000 +2022/10/28 15:43:16 listening on :10000 +``` + +2. Add a new data source in Grafana and use the following URL: + +``` +http://127.0.0.1:10000/metrics +``` + +## Learn more + +- [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) +- [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-streaming-backend-websocket/README.md b/examples/datasource-streaming-backend-websocket/README.md index 98b7319c1..4be87ddb9 100644 --- a/examples/datasource-streaming-backend-websocket/README.md +++ b/examples/datasource-streaming-backend-websocket/README.md @@ -1,12 +1,17 @@ -# Grafana Data Source Streaming Backend Plugin example +# Streaming Backend WebSocket Data Source Plugin for Grafana -This is an example of how to implement a Grafana data source plugin with streaming backend support. +This repository contains a streaming data source plugin complete with WebSocket integration. +## Overview -The plugin connects to the backend through a streaming connection and the backend establishes a connection to an external websocket server. +The Streaming Backend WebSocket Data Source Plugin demonstrates the integration of a backend WebSocket service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate WebSocket-based data sources into their Grafana dashboards for streaming data scenarios. -## Build +The plugin connects to the backend through a streaming connection and the backend establishes a connection to an external WebSocket server. -Build the data source plugin +The example server sends random numbers controlled by a query parameter. + +## Get started + +1. Build the data source plugin: ```sh cd streaming-backend-websocket-plugin @@ -15,7 +20,7 @@ npm install npm run build ``` -and run the Grafana and the example websocket server with Docker compose: +2. Run the Grafana and the example WebSocket server with Docker compose: ```sh cd streaming-backend-websocket-plugin @@ -26,8 +31,6 @@ The server can be accessed by the Grafana backend in `ws://websocket-server:8080 Refer to the [`docker-compose.yaml`](./streaming-backend-websocket-plugin/docker-compose.yaml) for more details. -The example server sends random numbers controlled by a query parameter. - ## Packages ### `streaming-backend-websocket-plugin` @@ -37,3 +40,9 @@ This package contains a Grafana data source plugin that establishes a connection ### `websocket-server` This package contains a WebSocket server that returns random values at random intervals. + +## Learn more + +- [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) +- [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-streaming-websocket/README.md b/examples/datasource-streaming-websocket/README.md index c579cd76b..6ba908466 100644 --- a/examples/datasource-streaming-websocket/README.md +++ b/examples/datasource-streaming-websocket/README.md @@ -1,8 +1,14 @@ -# Grafana Streaming Data Source WebSocket Plugin example +# Streaming WebSocket Data Source Plugin for Grafana -This is an example of how to implement a Grafana data source plugin with streaming support. +This repository provides an example of how to implement a Grafana data source plugin with streaming support. -## Build +## Overview + +The Streaming WebSocket Data Source Plugin illustrates the integration of WebSocket-based data sources into Grafana dashboards. This plugin serves as a reference implementation for developers aiming to incorporate real-time streaming data into their Grafana visualizations. + +This server returns random numeric values at random intervals. + +## Get started - Start the WebSocket server: @@ -27,3 +33,9 @@ This package contains a Grafana data source plugin that establishes a connection ### `websocket-server` This package contains a WebSocket server that returns random values at random intervals. + +## Learn more + +- [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) +- [Grafana documentation](https://grafana.com/docs/) diff --git a/examples/panel-datalinks/README.md b/examples/panel-datalinks/README.md index 6a050aee7..d108ff007 100644 --- a/examples/panel-datalinks/README.md +++ b/examples/panel-datalinks/README.md @@ -10,6 +10,8 @@ Use panel plugins when you want to do things like visualize data returned by dat ## Get started +A data source backend plugin consists of both frontend and backend components. Install these with the following CLI commands. + ### Frontend 1. Install dependencies: From 74611454e828e619efa2d70a6649aea5c3fd50d3 Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:07:57 -0700 Subject: [PATCH 02/11] Update examples/datasource-http-backend/README.md Co-authored-by: David Harris --- examples/datasource-http-backend/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-http-backend/README.md b/examples/datasource-http-backend/README.md index fdec845f9..1ab08a5de 100644 --- a/examples/datasource-http-backend/README.md +++ b/examples/datasource-http-backend/README.md @@ -57,7 +57,7 @@ $ mage -v ### Set up a server -1. Set up a backend server: +1. Set up a backend server to return data: ```bash From 76f2c6a5153767cf0e985757cbc112a88106322a Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:08:07 -0700 Subject: [PATCH 03/11] Update examples/datasource-http/README.md Co-authored-by: David Harris --- examples/datasource-http/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-http/README.md b/examples/datasource-http/README.md index c132d8061..fc725a153 100644 --- a/examples/datasource-http/README.md +++ b/examples/datasource-http/README.md @@ -1,4 +1,4 @@ -# Basic Data Source HTTP Plugin for Grafana +# Data Source HTTP Plugin for Grafana This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. ## Overview From 01ee91364724a7dc84c1cd436cb8119e5672b453 Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:08:29 -0700 Subject: [PATCH 04/11] Update examples/datasource-logs/README.md Co-authored-by: David Harris --- examples/datasource-logs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-logs/README.md b/examples/datasource-logs/README.md index 7161c3e41..071c56f4c 100644 --- a/examples/datasource-logs/README.md +++ b/examples/datasource-logs/README.md @@ -1,6 +1,6 @@ # Logs Data Source Plugin for Grafana -This repository contains a data source plugin with logs. +This repository contains a data source plugin for logs. ## Overview From cd0e420ffde2cd4337c76f193c7309a4f7a25adf Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:13:44 -0700 Subject: [PATCH 05/11] Update examples/datasource-streaming-backend-websocket/README.md Co-authored-by: David Harris --- examples/datasource-streaming-backend-websocket/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-streaming-backend-websocket/README.md b/examples/datasource-streaming-backend-websocket/README.md index 4be87ddb9..54617cdaa 100644 --- a/examples/datasource-streaming-backend-websocket/README.md +++ b/examples/datasource-streaming-backend-websocket/README.md @@ -3,7 +3,7 @@ This repository contains a streaming data source plugin complete with WebSocket integration. ## Overview -The Streaming Backend WebSocket Data Source Plugin demonstrates the integration of a backend WebSocket service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate WebSocket-based data sources into their Grafana dashboards for streaming data scenarios. +The Streaming WebSocket Backend Data Source Plugin serves as a reference implementation for developers seeking to incorporate WebSocket-based services into their Grafana dashboards for streaming data scenarios. The plugin connects to the backend through a streaming connection and the backend establishes a connection to an external WebSocket server. From fc5cd0c0e40530ad71bba3591fd1f17d61dfb109 Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:14:11 -0700 Subject: [PATCH 06/11] Update examples/datasource-streaming-backend-websocket/README.md Co-authored-by: David Harris --- examples/datasource-streaming-backend-websocket/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-streaming-backend-websocket/README.md b/examples/datasource-streaming-backend-websocket/README.md index 54617cdaa..500ea6c47 100644 --- a/examples/datasource-streaming-backend-websocket/README.md +++ b/examples/datasource-streaming-backend-websocket/README.md @@ -1,6 +1,6 @@ # Streaming Backend WebSocket Data Source Plugin for Grafana -This repository contains a streaming data source plugin complete with WebSocket integration. +This backend data source plugin shows how to stream data from a WebSocket. ## Overview The Streaming WebSocket Backend Data Source Plugin serves as a reference implementation for developers seeking to incorporate WebSocket-based services into their Grafana dashboards for streaming data scenarios. From 94a061f5b8946f17da827b10ec29991e6ffda41e Mon Sep 17 00:00:00 2001 From: Joseph Perez <45749060+josmperez@users.noreply.github.com> Date: Thu, 12 Sep 2024 12:14:26 -0700 Subject: [PATCH 07/11] Update examples/datasource-streaming-backend-websocket/README.md Co-authored-by: David Harris --- examples/datasource-streaming-backend-websocket/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-streaming-backend-websocket/README.md b/examples/datasource-streaming-backend-websocket/README.md index 500ea6c47..ac219e9bf 100644 --- a/examples/datasource-streaming-backend-websocket/README.md +++ b/examples/datasource-streaming-backend-websocket/README.md @@ -1,4 +1,4 @@ -# Streaming Backend WebSocket Data Source Plugin for Grafana +# Streaming WebSocket Backend Data Source Plugin for Grafana This backend data source plugin shows how to stream data from a WebSocket. ## Overview From 9cda9e3aa06db084784de5de5a698ddf1b9cb89f Mon Sep 17 00:00:00 2001 From: Joe Perez Date: Thu, 12 Sep 2024 12:22:07 -0700 Subject: [PATCH 08/11] Change first sentence per reviewer feedback --- examples/datasource-basic/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/datasource-basic/README.md b/examples/datasource-basic/README.md index c9232515d..2285fd73e 100644 --- a/examples/datasource-basic/README.md +++ b/examples/datasource-basic/README.md @@ -2,7 +2,7 @@ [![Build](https://github.com/grafana/grafana-starter-datasource/workflows/CI/badge.svg)](https://github.com/grafana/grafana-starter-datasource/actions?query=workflow%3A%22CI%22) -This repository contains a simple data source plugin example. +This example provides a template for how to build a simple frontend data source plugin. ## Overview The Basic Data Source Plugin offers a streamlined starting point for developers to understand the essential structure and functionality required for adding their own data sources to Grafana. From 40e670b4475a2ba83cafeef6d31bb5298e92ff3d Mon Sep 17 00:00:00 2001 From: Joe Perez Date: Thu, 12 Sep 2024 12:26:35 -0700 Subject: [PATCH 09/11] Reviewer feedback --- examples/datasource-basic/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/datasource-basic/README.md b/examples/datasource-basic/README.md index 2285fd73e..82361de1c 100644 --- a/examples/datasource-basic/README.md +++ b/examples/datasource-basic/README.md @@ -2,7 +2,7 @@ [![Build](https://github.com/grafana/grafana-starter-datasource/workflows/CI/badge.svg)](https://github.com/grafana/grafana-starter-datasource/actions?query=workflow%3A%22CI%22) -This example provides a template for how to build a simple frontend data source plugin. +This example provides a template for how to build a simple backend data source plugin. ## Overview The Basic Data Source Plugin offers a streamlined starting point for developers to understand the essential structure and functionality required for adding their own data sources to Grafana. @@ -11,7 +11,7 @@ Grafana supports a wide range of data sources, including Prometheus, MySQL, and ## Get started -Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. +Data source plugins may consist of a frontend or a backend component. This example shows a data source plugin with a backend component. Install this component with the following CLI commands. ### Frontend From 712709415e6fb12ae05a3ab27ed02c9017cd1a9a Mon Sep 17 00:00:00 2001 From: Joe Perez Date: Thu, 12 Sep 2024 12:30:24 -0700 Subject: [PATCH 10/11] Add link --- examples/datasource-basic/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/datasource-basic/README.md b/examples/datasource-basic/README.md index 82361de1c..e10b1c433 100644 --- a/examples/datasource-basic/README.md +++ b/examples/datasource-basic/README.md @@ -57,5 +57,6 @@ Data source plugins may consist of a frontend or a backend component. This exam ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) From 17d6508f1e346d48a36a958e7fbf4aaacc37aa52 Mon Sep 17 00:00:00 2001 From: Joe Perez Date: Thu, 12 Sep 2024 12:37:27 -0700 Subject: [PATCH 11/11] Add link to UI components across all DS examples --- examples/datasource-http-backend/README.md | 1 + examples/datasource-http/README.md | 27 ++---------------- examples/datasource-logs/README.md | 28 ++----------------- .../README.md | 1 + .../datasource-streaming-websocket/README.md | 1 + examples/panel-basic/README.md | 1 + 6 files changed, 9 insertions(+), 50 deletions(-) diff --git a/examples/datasource-http-backend/README.md b/examples/datasource-http-backend/README.md index 1ab08a5de..cd9510164 100644 --- a/examples/datasource-http-backend/README.md +++ b/examples/datasource-http-backend/README.md @@ -75,5 +75,6 @@ http://127.0.0.1:10000/metrics ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-http/README.md b/examples/datasource-http/README.md index fc725a153..4dcb85981 100644 --- a/examples/datasource-http/README.md +++ b/examples/datasource-http/README.md @@ -3,7 +3,7 @@ This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. ## Overview -The Grafana HTTP Backend Data Source Plugin shows the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate HTTP-based data sources into their Grafana dashboards. +The Grafana HTTP Data Source Plugin shows the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate HTTP-based data sources into their Grafana dashboards. Grafana supports a wide range of data sources, including Prometheus, MySQL, and 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 enable you to integrate such solutions with Grafana. @@ -11,7 +11,7 @@ This plugin differs from the `datasource-http-backend` example because the data ## Get started -Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. +Data source plugins consist of a frontend component. Install this component with the following CLI commands. ### Frontend @@ -33,30 +33,9 @@ Data source plugins consist of both frontend and backend components. Install the npm run build ``` -### Backend - -1. Update [Grafana Plugin SDK for Go](https://grafana.com/developers/plugin-tools/introduction/grafana-plugin-sdk-for-go) dependency to the latest minor version: - - ```bash - go get -u github.com/grafana/grafana-plugin-sdk-go - go mod tidy - ``` - -2. Build backend plugin binaries for Linux, Windows and Darwin: - - ```bash - mage -v - ``` - -3. List all available Mage targets for additional commands: - - ```bash - mage -l - ``` - - ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-logs/README.md b/examples/datasource-logs/README.md index 071c56f4c..f799f35bc 100644 --- a/examples/datasource-logs/README.md +++ b/examples/datasource-logs/README.md @@ -10,7 +10,7 @@ This is an example of a data source plugin that implements logging features. You ## Get started -Data source plugins consist of both frontend and backend components. Install these components with the following CLI commands. +Data source plugins may include both frontend and backend components. This example shows a frontend data source plugin. Install this component with the following CLI commands. ### Frontend @@ -21,33 +21,9 @@ $ npm install $ npm run build ``` -### Backend - -Build backend plugin binaries for Linux, Windows and Darwin: - -```bash -$ mage -v -``` - -### Set up a server - -1. Set up a backend server: - - -```bash -$ mage server -$ ./cmd/server/server :10000 -2022/10/28 15:43:16 listening on :10000 -``` - -2. Add a new data source in Grafana and use the following URL: - -``` -http://127.0.0.1:10000/metrics -``` - ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-streaming-backend-websocket/README.md b/examples/datasource-streaming-backend-websocket/README.md index ac219e9bf..9a8c18652 100644 --- a/examples/datasource-streaming-backend-websocket/README.md +++ b/examples/datasource-streaming-backend-websocket/README.md @@ -44,5 +44,6 @@ This package contains a WebSocket server that returns random values at random in ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) \ No newline at end of file diff --git a/examples/datasource-streaming-websocket/README.md b/examples/datasource-streaming-websocket/README.md index 6ba908466..123e9307d 100644 --- a/examples/datasource-streaming-websocket/README.md +++ b/examples/datasource-streaming-websocket/README.md @@ -37,5 +37,6 @@ This package contains a WebSocket server that returns random values at random in ## Learn more - [Grafana plugins documentation](https://grafana.com/developers/plugin-tools/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Build a data source plugin tutorial](https://grafana.com/developers/plugin-tools/tutorials/build-a-data-source-plugin) - [Grafana documentation](https://grafana.com/docs/) diff --git a/examples/panel-basic/README.md b/examples/panel-basic/README.md index e44555fea..373b0b42c 100644 --- a/examples/panel-basic/README.md +++ b/examples/panel-basic/README.md @@ -47,4 +47,5 @@ Use panel plugins when you want to do things like visualize data returned by dat - [Grafana developer portal](https://grafana.com/developers) - [Build a panel plugin tutorial](https://grafana.com/tutorials/build-a-panel-plugin/) - [Grafana documentation](https://grafana.com/docs/) +- [Grafana UI components documentation](https://developers.grafana.com/ui/latest/index.html) - [Grafana tutorials](https://grafana.com/tutorials/)