Plugins 〉Kafka
Kafka
Kafka Datasource for Grafana
The Kafka data source plugin allows you to visualize streaming Kafka data from within Grafana.
Reqirements
- Apache Kafka v0.9+
- Grafana v8.0+
Note: This is a backend plugin, so the Grafana server should've access to the Kafka broker.
Getting started
Installation via grafana-cli tool
Use the grafana-cli tool to install the plugin from the commandline:
grafana-cli plugins install hamedkarbasi93-kafka-datasource
The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins
. More information on the cli tool.
Installation via zip file
Alternatively, you can manually download the latest release .zip file and unpack it into your grafana plugins directory; the default is /var/lib/grafana/plugins
.
Configure the data source
Add a data source by filling in the following fields:
Basic fields
Field | Description |
---|---|
Name | A name for this particular AppDynamics data source |
Servers | The URL of the Kafka bootstrap servers separated by comma. E.g. broker1:9092, broker2:9092 |
Query the Data source
To query the Kafka topic, you have to config the below items in the query editor.
Field | Description |
---|---|
Topic | Topic Name |
Partition | Partition Number |
Auto offset reset | Starting offset to consume that can be from latest or last 100. |
Timestamp Mode | Timestamp of the message value to visualize; It can be Now or Message Timestamp |
Note: Make sure to enable the
streaming
toggle.
Known limitations
- The plugin currently does not support any authorization and authentication method.
- The plugin currently does not support TLS.
- Plugin is based on confluent-kafka-go, hence it only supports Linux-based operating systems as discussed in #6. However, we're cosidering changing the base package to support all operating systems.
This plugin supports topics publishing very simple JSON formatted messages. Note that only the following structure is supported as of now:
{
"value1": 1.0,
"value2": 2,
"value3": 3.33,
...
}
We plan to support more complex JSON data structures, Protobuf and AVRO in the upcoming releases. Contributions are highly encouraged!
Compiling the data source by yourself
A data source backend plugin consists of both frontend and backend components.
Frontend
Install dependencies
yarn install
Build plugin in development mode or run in watch mode
yarn dev
or
yarn watch
Build plugin in production mode
yarn build
Backend
Update Grafana plugin SDK for Go dependency to the latest minor version:
go get -u github.com/grafana/grafana-plugin-sdk-go go mod tidy
Build backend plugin binaries for Linux:
mage build:backend
Contributing
Thank you for considering contributing! If you find an issue or have a better way to do something, feel free to open an issue or a PR.
License
This repository is open-sourced software licensed under the Apache License 2.0.
Learn more
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
.h4 . .mb-0 }
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Installing Kafka on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Data Source
Use the grafana-cli tool to install Kafka from the commandline:
grafana-cli plugins install
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 for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Configure the Data Source
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section.
Next, click the Add data source button in the upper right. The data source will be available for selection in the Type select box.
To see a list of installed data sources, click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Changelog
1.0.0 (Unreleased)
Initial release.