Grafana Sankey Panel Plugin enables users to create Sankey Diagram panel in Grafana Dashboards. Panels are the building blocks of Grafana. They allow you to visualize data in different ways. For more information about panels, refer to the documentation on Panels. An example of Sankey Panel Plugin:
The Sankey Plugin is created using the Google Chart.
Supported Databases:
- Clickhouse
Currently the Sankey Plugin is created for restricted uses, only for visualizing network flows between the source and destination. To correctly loading data for the Sankey Plugin, the query must at least return 3 fields, in arbitrary order.
- field 1: the metric value field with an alias of
bytes
- field 2: value to group by with name or an alias of
source
- field 3: value to group by with name or an alias of
destination
- field 4+(optional): value to group by with name or an alias of
destinationIP
Clickhouse query example:
select SUM(octetDeltaCount) as bytes, sourcePodName as source, destinationPodName as destination, destinationIP
From flows
GROUP BY source, destination, destinationIP
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Use the grafana-cli tool to install sankey-panel-plugin from the commandline:
grafana-cli --pluginUrl https://downloads.antrea.io/artifacts/grafana-custom-plugins/theia-grafana-sankey-plugin-1.0.1.zip plugins install theia-grafana-sankey-plugin
The plugin will be installed into your grafana plugins directory; the default is
/var/lib/grafana/plugins
. More information on the cli tool.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
Installing to a Grafana deployed on Kubernetes:
In Grafana deployment manifest, configure the environment variable GF_INSTALL_PLUGINS
as below:
env:
- name: GF_INSTALL_PLUGINS
value: "https://downloads.antrea.io/artifacts/grafana-custom-plugins/theia-grafana-sankey-plugin-1.0.1.zip;theia-grafana-sankey-plugin"
Installed panels are available immediately in the Dashboards section in your Grafana main menu, and can be added like any other core panel in Grafana. To see a list of installed panels, click the Plugins item in the main menu. Both core panels and installed panels will appear. For more information, visit the docs on Grafana plugin installation.
This plugin is built with @grafana/create-plugin, which is a CLI that enables efficient development of Grafana plugins. To customize the plugin and do local testings:
-
Install dependencies
cd grafana-sankey-plugin yarn install
-
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
-
Build plugin in production mode
yarn build
- Build a panel plugin tutorial
- Grafana documentation
- Grafana Tutorials - Grafana Tutorials are step-by-step guides that help you make the most of Grafana
- Grafana UI Library - UI components to help you build interfaces using Grafana Design System