Altinn/altinn-notifications

Set up health checks confirming Kakfa connectivity as producer

Closed this issue · 2 comments

Description

We need a health check to confirm the connectivity between the e-mail service and the Kafka broker.

Considerations

  • Separate topic for the health check or simply a different consumer-group?

Development tasks

  • Add liveness and readiness probes in the helm chart
  • Implement health check in notifications
  • Implement health check in notifications email
  • QA
  • Manual test is complete (if relevant)

Test

  • Introduce an error or fault in some way and verify that health check fails and alarms are activated
  • Ensure alert rule picks up on errors

Acceptance criteria

  • Health check is enabled for the e-mail microservice
  • Health check is enabled for the notification microservice

Confirming connectivity with producer health check for now. Cannot guarantee that the consumer will read from the partition that a new health check message is written to without creating a flaky check.
Implemented and tested ok for notifications

Using AspNetCore.HealthChecks.NpgSql attempts to read from the yniqul table which the user has no rights to do (?). Anyways it ends with an exception `


Unhandled exception. Npgsql.NpgsqlException (0x80004005): Exception while reading from stream

Custom health check towards postgre has run successfully