The MQTT data source plugin allows you to visualize streaming MQTT data from within Grafana.
This datasource is under active development, all feedback and help is encouraged!
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.
- The plugin currently does not support all of the MQTT CONNECT packet options.
- The plugin currently does not support TLS.
- Including multiple topics in a panel is not yet well supported.
- This plugin automatically 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 do plan to support more complex JSON data structures in the upcoming releases. Contributions are highly encouraged!
- This plugin currently attaches timestamps to the messages when they are received, so there is no way to have custom timestamp for messages.
Refer to: Building a Streaming Datasource Backend Plugin
- Clone the plugin to your Grafana plugins directory.
- Build the plugin by running
yarn install
and thenyarn build
. - Run
mage reloadPlugin
or restart Grafana for the plugin to load.
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+
- 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.
Add a data source by filling in the following fields:
Field | Description |
---|---|
Name | A name for this particular AppDynamics data source |
Host | The hostname or IP of the MQTT Broker |
Port | The port used by the MQTT Broker (default 1883) |
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 |
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.