You can integrate your Exception Logger plugin to other plugins pinned in your pipeline to send all exceptions to any logging platform for analysis and monitoring.
Note: For the purpose of this article, we will be using the MQTT Gateway plugin as an example for integrating an Exception Logger plugin to other plugins.
To integrate an Exception Logger plugin to other plugins, perform the following steps:
- Navigate to Pipeline Studio then create a new pipeline.
- Locate the MQTT Gateway plugin then drag and drop the plugin onto the design canvas.
- Double-click the plugin then configure it by providing the required details.
- After you have configured the plugin, go to the Logging tab.
- From the Exception Loggers drop-down menu, select the Exception Logger you want to use.
- Click Save to complete your changes in the plugin.
Note: For more information on how to configure a plugin, see Configuring Plugins in your Pipeline.
- Click Save & Deploy to run the pipeline.
After you have configured and integrated the Logger plugin to other plugins in your pipeline, you need to connect your device to a client simulator in order to send device data to your plugins. For the MQTT Gateway plugin, we will be using the MQTTBox.
Perform the following steps to connect your device in MQTTBox:
- Open the MQTTBox then click Create MQTT Client.
- Provide the following MQTT Client Settings:
- MQTT Client Name - Enter a name for the device connection.
- MQTT Client ID - Enter the device ID.
- Protocol - Select the protocol as mqtt/tcp.
- Host - Enter the IP address and port generated for the Gateway.
- Click Save to complete your connection. Once connection is established, you can start sending data to the device as shown from the sample screenshot below. Note that for the purpose of this article, an incorrect value was entered in the Topic to publish field so that an error will be generated for the plugin. Note: For detailed information on how to connect and send data to the device using MQTTBox, refer to the MQTT Gateway plugin online help. To view and analyze the exception logs, refer to the Verifying Exception Logs article.