The logs that are useful for debugging thin-edge.io break down into logs that are created by thin-edge itself and by third party components.
On a thin-edge device different components like mappers, agent, and plugins run. The log messages of these components can be accessed as below. The logs here capture INFO, WARNING, and ERROR messages.
The thin-edge cloud mapper component that sends the measurement data to the cloud can be accessed as below.
The log messages of the Cumulocity mapper component that sends the measurement data from the thin-edge device to the Cumulocity cloud can be accessed as below
journalctl -u tedge-mapper-c8y.service
tedge_mapper --debug c8yto log more debug messages
The log messages of the Azure mapper component that sends the measurement data from the thin-edge device to the Azure cloud can be accessed as below.
journalctl -u tedge-mapper-az.service
tedge_mapper --debug azto log more debug messages
The thin-edge device monitoring component logs can be found as below
The log messages of the collectd mapper that sends the monitoring data to the cloud can be accessed as below
journalctl -u tedge-mapper-collectd.service
tedge_mapper --debug collectdto log more debug messages
This section describes how to access the software management component logs
For every new software operation (list/update), a new log file will be created at
plugin command like prepare, update-list (install, remove), finalize, and list,
the log file captures
exit status, stdout, and stderr messages.
The agent service logs can be accessed as below
journalctl -u tedge-agent.service
For example: tedge-agent logs plugin calls finalize and list.
tedge-agent : TTY=unknown ; PWD=/tmp ; USER=root ; COMMAND=/etc/tedge/sm-plugins/apt finalize
tedge-agent : TTY=unknown ; PWD=/tmp ; USER=root ; COMMAND=/etc/tedge/sm-plugins/apt list
tedge_agent --debugto log more debug messages
Thin-edge uses the third-party components
Mosquitto as the mqtt broker and
Collectd for monitoring purpose.
The logs that are created by these components can be accessed on a thin-edge device as below.
Mosquitto as the
mqtt broker for local communication as well as to communicate with the cloud.
Mosquitto logs can be found in
Mosquitto captures error, warning, notice, information, subscribe, and unsubscribe messages.
log_type allon /etc/mosquitto/mosquitto.conf, to capture more debug information.
Collectd is used for monitoring the resource status of a thin-edge device.
Collectd logs all the messages at
So, the collectd specific logs can be accessed using the
journalctl as below
journalctl -u collectd.service