moira
moira copied to clipboard
fix(api): enable reporting of why notifications were turned off
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
NotifierStatestruct already supports bothStateandMessage. - Log a more helpful message when Moira turns itself off but is still able to access the database (e.g
filterreceives 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