- Step 1. Remote logging activation and setting the logging level
- Step 2. Display logs on a dashboard
- Next steps
This guide will help you to enable remote logging and read logs from ThingsBoard IoT Gateway on your ThingsBoard platform instance.
For purpose of this guide, we will use following things:
- Locally installed instance of ThingsBoard platform (How to install you can read here).
- ThingsBoard IoT Gateway (How to install you can read here).
Step 1. Remote logging activation and setting the logging level
To activate and set logging level, please follow next steps:
- Open the gateway device details in the WEB UI.
- Go to a tab “Attributes”.
- Select Shared Attributes from an Entity attribute scope list.
- Click “+” button (add new attribute).
- In “Add attribute” window fill fields with the following values:
- The name field must be RemoteLoggingLevel
- The value field sets the logging level, the values can be as follows:
1 2 3 4 5 6
DEBUG INFO WARNING ERROR CRITICAL NONE
- Click Add
- Launch your gateway in case it is not running [Optional].
- Open the Latest telemetry tab of your gateway device, and you will see the new telemetry key – LOGS.
Step 2. Display logs on a dashboard
It may be not convenient to review logs in the Device details window. We should show them on a dashboard.
So we will be able to investigate all logs, not only the latest one.
To do this we use following steps:
-
Check LOGS key and click “Show on widget” button:
-
We will use the default Cards widget:
-
Choose Timeseries table Card widget and add it to the Dashboard. It can be either the new one or the existing dashboard.
-
As a result now we can monitor the status of the gateway device from ThingsBoard environment.
Next steps
Explore guides related to main ThingsBoard features:
- Data Visualization - how to visualize collected data.
- Device attributes - how to use device attributes.
- Telemetry data collection - how to collect telemetry data.
- Using RPC capabilities - how to send commands to/from devices.
- Rule Engine - how to use rule engine to analyze data from devices.