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

Alerting: Manage remote Alertmanager silences #75452

Merged

Conversation

santihernandezc
Copy link
Contributor

Description

This PR allows Grafana to manage silences on an external Alertmanager the same way we handle silences in the internal Alertmanager.

It uses the upstream Alertmanager client to make HTTP requests and a custom round-tripper to add basic auth credentials and custom headers.

Note: all silence-related methods now take a context.Context as the first argument

Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/services/ngalert/notifier/external_alertmanager.go Outdated Show resolved Hide resolved
pkg/services/ngalert/notifier/external_alertmanager.go Outdated Show resolved Hide resolved
@santihernandezc santihernandezc merged commit 73be944 into main Oct 2, 2023
13 checks passed
@santihernandezc santihernandezc deleted the santihernandezc/manage_remote_alertmanager_silences branch October 2, 2023 10:36
bergquist added a commit that referenced this pull request Oct 2, 2023
* main: (51 commits)
  Postgres: Make securejson password optional (#75801)
  Alerting: Manage remote Alertmanager silences (#75452)
  Replace use of `relref` shortcode with `docs/reference` so links work in Grafana Cloud (#75433)
  Add canonical for testing new canonical behavior in Grafana Cloud (#75745)
  InfluxDB SQL: Remove default limitation in the query (#75749)
  Publish documentation from the HEAD of the matching version branch on tag events (#73809)
  IDforwarding: forward signed id to plugins (#75651)
  Navtree: Rename page title from "Infrastructure" to "Integrations" (#75721)
  Changelog: Updated changelog for 9.5.12 (#75776)
  Chore: update latest.json to 10.1.4 (#75773)
  Changelog: Updated changelog for 10.1.4 (#75769)
  Changelog: Updated changelog for 10.0.8 (#75768)
  Tempo: TraceQL results as a spans list (#75660)
  Bug: Exclude 32-bit `arm` builds (#75448)
  Transformations: Fix inconsistent wording of transformation descriptions (#75746)
  i18n: dashboard import page (#75664)
  Fix issue-labeled GitHub Action (#75753)
  Schema: link table panel to the schema definitions (#75671)
  Plugins: Move alias support to plugin json (but still hardcoded) (#75129)
  Sandbox: allow access to window.grafanaBootData for plugins (#75522)
  ...
mildwonkey pushed a commit that referenced this pull request Oct 4, 2023
* Alerting: Manage remote Alertmanager silences

* fix typo

* check errors when encoding json in fake external AM

* take path from configured URL, check for nil responses
@zerok zerok modified the milestones: 10.2.x, 10.2.0 Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants