Skip to main content
Version: Next

Health Monitoring

The health of a service or any other service that is running on the device or on the child device can be monitored from the Cumulocity IoT by sending the health-status message to Cumulocity IoT.

Publish health status

A health status message can be published for any service on a status/health channel. The health message should at least contain the status of the service.


The status here can be up or down or any other string. For example, unknown.

For example, to update the health status of device/my-device/service/my-test-service service, one has to send the following message:

tedge mqtt pub -r -q 2 'te/device/my-device/service/my-test-service/status/health' '{
"status": "up"

The health status message has to be sent as a retain message.

When an empty health status message is sent, e.g. {} or '', the status will be replaced with unknown.

Conversion of the health status message to Cumulocity IoT service monitor message

The tedge-mapper-c8y will translate any health status message that is received on te/+/+/+/+/status/health topic to Cumulocity Service status update SmartREST message and send it to the Cumulocity cloud. If a service was not previously registered and it fulfills the requirements for auto-registration, it will be auto-registered as described in the Auto Registration section.

For example, assuming a service device/child1/service/service1, running on a device device/child1//, which is a child device of device device/main// with an ID of TE_DEVICE, the resulting topic mapping looks like this: health status message

tedge mqtt pub -r -q 2 'te/device/child1/service/service1/status/health' '{
"status": "up"

Cumulocity IoT (output)


Configuring the default service type

The default service type can be configured using the tedge cli.

The example below shows how one can set the default service type to systemd.

sudo tedge config set service.type systemd

When the type property was not included in the service registration message, then the configured default value will be used by the mapper while auto-registering the service.

To clear the configured default service type one can use the command below. This will set the service.type to service.

sudo tedge config unset service.type


More info about the service monitoring can be found in the below link

Service monitoring Cumulocity IoT