Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unified Alerting Service Configuration #868

Merged
merged 5 commits into from
Mar 7, 2023

Conversation

celestialorb
Copy link
Contributor

Description

Adds another managed Kubernetes service for unified alerting, and adds the appropriate configuration to Grafana to utilize it for such.

Relevant issues/tickets

#855

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

While I have verified that the manifests are updated appropriately, I haven't yet verified that the unified alerting functions as intended with these manifests/configuration. I'm throwing this PR up now in order not to forget about it later / gather feedback on it before proceeding further.

@@ -702,6 +702,10 @@ func (i *GrafanaIni) cfgUnifiedAlerting(config map[string][]string) map[string][
items = appendStr(items, "evaluation_timeout", i.cfg.UnifiedAlerting.EvaluationTimeout)
items = appendInt(items, "max_attempts", i.cfg.UnifiedAlerting.MaxAttempts)
items = appendStr(items, "min_interval", i.cfg.UnifiedAlerting.MinInterval)

items = appendStr(items, "ha_advertise_address", "${POD_IP}:9094")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this always hardcoded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it would need the pod IP I believe, but if you're referring to the port I believe that can be made configurable if we want to add that field to the Grafana CRD.

@pb82
Copy link
Collaborator

pb82 commented Jan 17, 2023

@celestialorb I'm not familiar with Grafana Alerting, can you please quickly describe why an extra service is required? Thanks!

@BcTpe4HbIu
Copy link

Extra service is required for ha configuration. Without it grafana will send each alert from every running pod.

Also this configuration requires POD_IP environment variable and I dont see it in current manifests.

Docs: https://grafana.com/docs/grafana/latest/alerting/set-up/configure-high-availability/#enable-alerting-high-availability-using-kubernetes

@pb82 pb82 self-assigned this Feb 28, 2023
@pb82 pb82 merged commit a33ef1d into grafana:master Mar 7, 2023
@not7cd
Copy link

not7cd commented Jun 21, 2024

Is there a documentation how to enable this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants