monitoring: grafana email notifier support
Created by: bobheadxi
Closes https://github.com/sourcegraph/sourcegraph/issues/11454
This PR adds:
- email support for notifiers
- automatic sync for SMTP settings from Sourcegraph site configuration
Implementation details:
- map relevant parts of all site config to a
GrafanaChange
- changes now only have access to the new configuration (ie their goal is purely to apply incoming changes - this ties into my first question further down)
- add new wrapper around the grafana client,
GrafanaController
, to also allow stop/restart capabilities
Questions:
-
failure behaviour (https://github.com/sourcegraph/sourcegraph/issues/11454#issuecomment-644576628 => https://github.com/sourcegraph/sourcegraph/pull/11554/files#diff-42ca82e5e966d29f64bb4a21c9e25983R194), currently: - nothing happens if problem is encountered by
grafana-wrapper
while performing update - if grafana exits with status code >2,
grafana-wrapper
exits (exit code 1 is emitted when Grafana is SIGINT'd so we ignore it)
- nothing happens if problem is encountered by
-
is EHLO == HELO? https://github.com/sourcegraph/sourcegraph/pull/11554/files#diff-229cb10705aabb2149674e4fd1a58bfeR30 -
not sure what smtp.authentication
does (don't seem to see an equivalent in the Grafana SMTP config) => I believe Grafana triesCRAM-MD5 PLAIN
in that order