diff --git a/CHANGELOG.md b/CHANGELOG.md index 25940fd..e9d828d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2.3.0 (2023-04-04) +## 2.3.0 (2023-04-05) ### Features / Enhancements @@ -9,6 +9,7 @@ - Update to Grafana 9.3.6 (#19) - Update to Grafana 9.4.7 (#20) - Update backend and workflows to Go 1.19 (#21) +- Update Documentation (#22) ## 2.2.0 (2022-11-06) diff --git a/README.md b/README.md index dbb8f66..b0cf6d7 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,18 @@ ## Introduction -The Environment Data Source is a plugin for Grafana that returns environment variables to display on your dashboard or use as Variables to retrieve data. +The Environment Data Source is a plugin for Grafana that returns environment variables to display on your dashboard or use as Variables in your code. [![Grafana variables | Dashboard, Global and Environment variables | Environment Data Source](https://raw.githubusercontent.com/volkovlabs/volkovlabs-env-datasource/main/img/video.png)](https://youtu.be/sczRq2lI3e4) -### Requirements +## Requirements -- **Grafana 8.5+**, **Grafana 9.0+** is required for version 2.X. -- **Grafana 8.0+** is required for version 1.X. +- **Grafana 8.5+**, **Grafana 9.0+** is required for major version 2. +- **Grafana 8.0+** is required for major version 1. ## Getting Started -Environment Data Source is not included in the Grafana Catalog and signed as Private plugin. It can be installed manually from our Private Repository or downloaded directly from the GitHub: +Environment Data Source is not included in the Grafana Catalog. It can be installed manually from our Private Repository or downloaded directly from GitHub. ```bash grafana-cli --repo https://volkovlabs.io/plugins plugins install volkovlabs-env-datasource @@ -29,82 +29,26 @@ grafana-cli --repo https://volkovlabs.io/plugins plugins install volkovlabs-env- ## Features - Returns Environment Variables. -- Allows to filter unnecessary or secured variables using Regex. - -## Private plugin - -Plugin is signed as a Private plugin for Grafana using the default domain `http://localhost:3000`. If you are using custom domain URL, there are various options depends on your deployment: - -### NGINX Reverse proxy - - We recommend using NGINX in front of the Grafana for an extra level of protection. It allows keeping the default domain and redirect requests. - - Here is the quick example for Docker Compose. You can find full example in the repository. - -```docker -version: '3.4' - -services: - grafana: - container_name: grafana - image: grafana/grafana:latest - ports: - - 3000:3000/tcp - environment: - - GF_INSTALL_PLUGINS=https://github.com/VolkovLabs/volkovlabs-env-datasource/releases/download/v2.2.0/volkovlabs-env-datasource-2.2.0.zip;volkovlabs-env-datasource - volumes: - - ./provisioning:/etc/grafana/provisioning - - nginx: - container_name: nginx - build: ./nginx - restart: always - environment: - - GRAFANA_HOST=localhost - ports: - - 80:80/tcp - - 443:443/tcp - depends_on: - - grafana -``` - -### Unsigned plugin - - Take a look at [Allow Unsigned Plugins](https://volkovlabs.io/plugins/grafana/allow-unsigned/) section in the documentation. +- Allows filtering unnecessary or secured variables using Regex. +- Supports Dashboard Variables. -### Build plugin and sign +## Documentation - Alternatively, you can build and sign plugin manually following instructions. **Go and Node.js are required**. +| Section | Description | +| ---------------------------- | ------------------------------------------------------------ | +| [Deployment](https://volkovlabs.io/plugins/volkovlabs-env-datasource/deployment/) | Explains deployment options for the data source. | +| [Provisioning](https://volkovlabs.io/plugins/volkovlabs-env-datasource/provisioning/) | Demonstrates how to automatically provision the data Source. | +| [Release Notes](https://volkovlabs.io/plugins/volkovlabs-env-datasource/release/) | Stay up to date with the latest features and updates. | -``` -yarn install -yarn build -yarn build:backend -grafana-toolkit plugin:sign --rootUrls http://XXX/ -``` +### Features -## Provisioning - -Grafana supports managing data sources by adding one or more YAML config files in the `provisioning/datasources` folder. - -Example of provisioning the Environment Data Source with a filter `GF_` to return only Grafana related variables. - -```yaml -datasources: - - name: Environment - type: volkovlabs-env-datasource - access: proxy - isDefault: true - orgId: 1 - version: 1 - editable: true - jsonData: - filter: GF_ -``` +| Section | Description | +| -------------------------------- | -------------------------------------------- | +| [Dashboard Variables](https://volkovlabs.io/plugins/volkovlabs-env-datasource/variables/) | Demonstrates how to use Dashboard variables. | ## Feedback -We love to hear from you. There are various ways to get in touch with us: +We love to hear from you. There are various ways to get in touch with us. - Ask a question, request a new feature, and file a bug with [GitHub issues](https://github.com/volkovlabs/volkovlabs-env-datasource/issues/new/choose). - Sponsor our open-source plugins for Grafana with [GitHub Sponsor](https://github.com/sponsors/VolkovLabs). diff --git a/docker-compose-nginx.yml b/docker-compose-nginx.yml index 8df1f91..1afe78b 100644 --- a/docker-compose-nginx.yml +++ b/docker-compose-nginx.yml @@ -7,7 +7,7 @@ services: ports: - 3000:3000/tcp environment: - - GF_INSTALL_PLUGINS=https://github.com/VolkovLabs/volkovlabs-env-datasource/releases/download/v2.2.0/volkovlabs-env-datasource-2.2.0.zip;volkovlabs-env-datasource + - GF_INSTALL_PLUGINS=https://github.com/VolkovLabs/volkovlabs-env-datasource/releases/download/v2.3.0/volkovlabs-env-datasource-2.3.0.zip;volkovlabs-env-datasource volumes: - ./provisioning:/etc/grafana/provisioning diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index e272e49..9b7b5a5 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -32,7 +32,7 @@ func NewDatasource(dis backend.DataSourceInstanceSettings) (instancemgmt.Instanc err := json.Unmarshal(dis.JSONData, &settings) if err != nil { - return nil, fmt.Errorf("could not unmarshal PluginSettings json: %w", err) + return nil, fmt.Errorf("Could not unmarshal PluginSettings json: %w", err) } return &Datasource{Settings: &settings}, nil diff --git a/src/img/dashboard.png b/src/img/dashboard.png index 84696e9..b33d797 100644 Binary files a/src/img/dashboard.png and b/src/img/dashboard.png differ diff --git a/src/img/variables.png b/src/img/variables.png deleted file mode 100644 index af082cc..0000000 Binary files a/src/img/variables.png and /dev/null differ diff --git a/src/plugin.json b/src/plugin.json index 5e7cfc3..f24fb66 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -32,10 +32,6 @@ { "name": "Dashboard", "path": "img/dashboard.png" - }, - { - "name": "Variables", - "path": "img/variables.png" } ], "updated": "%TODAY%",