How to configure metrics in thinEdge to disable / set the refresh rate higher

Hello C8Y-community,

we have updated thinEdge from 1.3.1 to 1.5.1. Is it possible to send fewer metrics to the c8y tenant or disable them at all?

Thank you for your answers in advance.

Regards
Lorn

The c8y mapper can be configured to subscribe only a topic subset.

$ tedge config list --doc c8y.topics   
c8y.topics  Set of MQTT topics the Cumulocity mapper should subscribe to. 
            Example: te/+/+/+/+/a/+,te/+/+/+/+/m/+,te/+/+/+/+/e/+

The defaults is to listen to all MEAs:

$ tedge config get c8y.topics                             
["te/+/+/+/+", "te/+/+/+/+/twin/+", "te/+/+/+/+/m/+", "te/+/+/+/+/e/+", "te/+/+/+/+/a/+", "te/+/+/+/+/status/health"]

And you can narrow or extend this topic list:

$ tedge config remove c8y.topics "te/+/+/+/+/m/+" 
$ tedge config add c8y.topics "te/+/+/+/+/m/resource_usage"
$ tedge config get c8y.topics                           
["te/+/+/+/+", "te/+/+/+/+/a/+", "te/+/+/+/+/e/+", "te/+/+/+/+/m/resource_usage", "te/+/+/+/+/status/health", "te/+/+/+/+/twin/+"]

You will have to restart the mapper then.

1 Like

@Lorn_Kjewlsvar The listed metrics are actually coming from tedge-container-plugin (not the core thin-edge.io components).

Generally the tedge-container-plugin is not installed by default (when installing the core thin-edge.io components, i.e. if you followed the thin-edge.io Installation Guide), however it is included in projects such as the tedge-demo-container as it show cases how thin-edge.io can be easily extended to also manage containers, but again this is all purely optional.

The tedge-container-plugin supports its own configuration which you can read about it from the Documentation. You can either disable the metrics all together or change the interval at which they are published.

You can get/set the configuration using the standard thin-edge.io configuration management (you’ll have to add the configuration type to the /etc/tedge/plugins/tedge-configuration-plugin.toml, which can also be managed from the cloud).

Or if you don’t want container management at all, then simply remove the package (which is called either “tedge-container-plugin” (legacy) or “tedge-container-plugin-ng” (depending on which version you are using).

1 Like