Grafana Service Dependency Plugin allows users to visualize how Pods send and receive traffic to and from other Pods and Services. To help visualize the flows, the plugin shows them 'inside' the Node they are a part of.
graph LR;
subgraph worker_node
worker_pod_1
worker_pod_2
end;
A line pointing from source to destination is also shown, with the amount of data transmitted in the selected time range labelling the line.
graph LR;
subgraph worker_node
worker_pod_1 -- 8.4 MB --> worker_pod_2
end;
The Service Dependency Graph Plugin is created using mermaid-js
Supported Databases:
- ClickHouse
Currently the Service Dependency Graph Plugin is created for restricted uses, only for visualizing transmitted data between Pods and Services. For correct loading of data for the Service Dependency Graph Plugin, the query is expected to return the following fields, in arbitrary order.
- field 1: sourcePodName value with name or an alias of
sourcePodName
- field 2: sourceNodeName value with name or an alias of
sourceNodeName
- field 3: destinationPodName value with name or an alias of
destinationPodName
- field 4: destinationNodeName value with name or an alias of
destinationNodeName
- field 5: destinationServicePortName value with name or an alias of
destinationServicePortName
- field 6: octetDeltaCount value with name or an alias of
octetDeltaCount
ClickHouse query example:
SELECT sourcePodName,
sourceNodeName,
destinationPodName,
destinationNodeName,
destinationServicePortName,
octetDeltaCount
FROM flows
WHERE destinationPodName != ''
AND sourcePodName != ''
AND octetDeltaCount != 0
AND $__timeFilter(flowEndSeconds)
ORDER BY flowEndSeconds DESC
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 chord-panel-plugin from the commandline:
grafana-cli --pluginUrl https://downloads.antrea.io/artifacts/grafana-custom-plugins/theia-grafana-dependency-plugin-1.0.0.zip plugins install theia-grafana-dependency-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-dependency-plugin-1.0.0.zip;theia-grafana-dependency-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/toolkit, which is a CLI that enables efficient development of Grafana plugins. To customize the plugin and do local testings:
-
Install dependencies
cd grafana-dependency-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