Skip to content

intercloud/intercloud-grafana-plugin

Repository files navigation

InterCloud Grafana Data Source Plugin

This plugin provides a Grafana Data Source to show InterCloud's services metrics from the REST API.

Grafana server version: >= 7.4.0 - < 8.0.0

Quick Test

1. Environment and tools

Requirements:

You need a node engine version ">=14 <15". You can use nvm to manage different versions.

You also will need yarn to build the plugin.

2. Run a local grafana with InterCloud's plugin

git clone https://github.com/intercloud/intercloud-grafana-plugin.git
cd intercloud-grafana-plugin
yarn install
yarn build

After that, you can start a docker container :

  • On Windows
docker run -d -p 3000:3000 -v %cd%/dist:/var/lib/grafana/plugins/intercloud --name=grafana grafana/grafana:7.4.0
  • On Linux
docker run -d -p 3000:3000 -v `pwd`/dist:/var/lib/grafana/plugins/intercloud --name=grafana grafana/grafana:7.4.0

Then open your browser on http://localhost:3000 (use admin/admin as default credentials, you can change it after login).

Add the InterCloud Data Source (See https://grafana.com/docs/grafana/latest/features/datasources/add-a-data-source/) and configure you API Key to make grafana access InterCloud API (You can create an InterCloud portal Personal Access Token to be used as Grafana API Key)

To minimize the amount of sensitive information sent to and from the browser, data source plugins can use the Grafana data source proxy. When using the data source proxy, any requests containing sensitive information go through the Grafana server. No sensitive data is sent to the browser after the data is saved.

Press Save & Test button.

3. Create panel

Go to + > Create > Dashboard and Add a new panel. Fill the query information with the IRN of the service you want to retrieve metrics (e.g. irn:connectors:skstok62tbks::p0q4dy) and choose metric.

You can add more than one query per panel and change the panel title.

Getting started with development for the plugin

1. Install dependencies

yarn install

2. Build plugin in development mode or run in watch mode

yarn dev

or

yarn watch

3. Build plugin in production mode

yarn build

Todo

  • Signature verification
  • Support status measures
  • Add alerting support (backend plugin)
  • Add annotations support
  • ci/cd
  • unit tests

Learn more

About

Grafana datasource plugin for InterCloud's services metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •