thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

Test thin-edge health-check feature

Open PradeepKiruvale opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Thin-edge provides health-check feature for checking the health of the thin-edge services. Basically, these services expose MQTT topics to check the health of the services.

As a reference implementation thin-edge implements the systemd based health-check mechanism. This feature has to be tested.

Describe the solution you'd like Test steps For example for tedge-mapper-c8y

  1. tedge connect, this will start the tedge-mapper-c8y service
  2. Stop tedge-mapper-c8y service using systemctl stop tedge-mapper-c8y.service
  3. Update the /lib/systemd/system/tedge-mapper-c8y.service file with WatchdogSec=30 in the services section
  4. Reload the systemd files systemctl daemon-reload
  5. Now start tedge-mapper-c8y as systemctl start tedge-mapper-c8y.service
  6. Start the watchdog service systemctl start tedge-watchdog.service
  7. Observe the messages that are exchanged on tedge/health-check topics

Now kill the tedge-mapper-c8y, it should get restarted and should exchange the messages as before.

This process has to be followed for all the services tedge-agent tedge-mapper-az tedge-mapper-collectd c8y-log-plugin c8y-configuration-plugin

Describe alternatives you've considered

Additional context One can see more information here

https://github.com/thin-edge/thin-edge.io/blob/main/docs/src/howto-guides/020_monitor_tedge_health.md https://github.com/thin-edge/thin-edge.io/blob/main/docs/src/howto-guides/021_enable_tedge_watchdog_using_systemd.md

PradeepKiruvale avatar Jul 28 '22 13:07 PradeepKiruvale