moira icon indicating copy to clipboard operation
moira copied to clipboard

fix(api): enable reporting of why notifications were turned off

Open idoqo opened this issue 5 years ago • 1 comments

PR Summary

When Moira notifications are turned off, we show a default message (dto.ErrorMessage) and this isn't always helpful. Instead:

  • Let users describe their purpose when they disable notifications from the web UI. This is possible as the NotifierState struct already supports both State and Message.
  • Log a more helpful message when Moira turns itself off but is still able to access the database (e.g filter receives no metrics for longer than last_metric_received_delay)

Additional information

We need to add a text field to the notifications page for users to describe their purpose when disabling notifications. I plan to do that once the API changes are okay and merged.

Closes #469

idoqo avatar Mar 26 '20 22:03 idoqo

Coverage Status

Coverage decreased (-0.04%) to 80.405% when pulling 8edb1ede438642d479934b17c8c25f7c8d4dd655 on idoqo:fix/log-notification-message into ea9670976c789e68b7c2454662cb7cf503f54021 on moira-alert:master.

coveralls avatar Mar 26 '20 22:03 coveralls