Plugins 〉MQTT
MQTT
MQTT data source for Grafana
The MQTT data source plugin allows you to visualize streaming MQTT data from within Grafana.
Requirements
The MQTT data source has the following requirements:
- Grafana user with a server or organization administration role; refer to Permissions.
- Access to a MQTT broker.
Configure the data source
Add a data source by filling in the following fields:
Basic fields
Field | Description |
---|---|
Name | A name for this particular MQTT data source |
URI | The scheme, host, and port of the MQTT Broker. Supported schemes: TCP (tcp://), TLS (tls://), and WebSocket (ws://) |
Authentication fields
Field | Description |
---|---|
Username | (Optional) The username to use when connecting to the MQTT broker |
Password | (Optional) The password to use when connecting to the MQTT broker |
Query the data source
The query editor allows you to specify which MQTT topics the panel will subscribe to. Refer to the MQTT v3.1.1 specification for more information about valid topic names and filters.
Known limitations
- The plugin currently does not support all of the MQTT CONNECT packet options.
- This plugin automatically supports topics publishing numbers, strings, booleans, and JSON formatted values. Nested object values can be extracted using the
Extract Fields
transformation. - This plugin automatically attaches timestamps to the messages when they are received. Timestamps included in the message body can be parsed using the
Convert field type
transformation.
Install the plugin
Installation Pre-requisites
Refer to: Building a Streaming Datasource Backend Plugin
Meet compatibility requirements
This plugin currently supports MQTT v3.1.x.
Note: Since this plugin uses the Grafana Live Streaming API, make sure to use Grafana v8.0+
Installation Steps
- Clone the plugin to your Grafana plugins directory.
- Build the plugin by running
yarn install
and thenyarn build
.
NOTE: The yarn build
command above might fail on a non-unix-like system, like Windows, where you can try replacing the rm -rf
command with rimraf
in the ./package.json
file to make it work.
- Run
mage reloadPlugin
or restart Grafana for the plugin to load.
Verify that the plugin is installed
- In Grafana from the left-hand menu, navigate to Configuration > Data sources.
- From the top-right corner, click the Add data source button.
- Search for
MQTT
in the search field, and hover over the MQTT search result. - Click the Select button for MQTT.
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
- 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 MQTT 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 MQTT 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.1.0-beta.2] - 2024-08-21
- Upgrade dependencies
[1.1.0-beta.1] - 2024-06-06
- Add support for TLS Client Authentication
- Add TLS Skip Verify option
- Add Support for specifying a custom CA Certificate
[1.0.0-beta.4] - 2024-03-21
- Add support for MQTT Wildcards
[1.0.0-beta.3] - 2023-08-17
- Fix for #44
[1.0.0-beta.2] - 2023-04-25
- Update Plugin SDK dependency
[1.0.0-beta.1] - 2022-12-01
- Initial release