Repository navigation
feat: migrate Prometheus plugin from Alertmanager API v1 to v2 - #420
Merged
Merged
Conversation
- Replace all /api/v1/ endpoints with /api/v2/ - Add required isRegex field to silence matchers - Fix silence response parsing for v2 format (silenceID at top level) Fixes #407 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify API v2 endpoints, request/response formats, silence lifecycle, and parse_duration helper. Response formats based on Alertmanager OpenAPI spec: https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Note API v2 requirement and Alertmanager version compatibility - Add settings table with all configuration options - Update troubleshooting logs to show v2 response format - Update references to include OpenAPI spec - Clean up clustered Alertmanager documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Breaking change: requires Alertmanager >= 0.16.0 (API v2). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove os.environ setup before imports and patch module-level ALERTMANAGER_SILENCE_FROM_ACK in the test instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/v1/endpoints with/api/v2/(silences, alerts, silence delete)isRegexfield to silence matchers (v2 API requires this){"silenceID": "..."}at top level instead of{"status":"success","data":{"silenceId":...}})Alertmanager deprecated API v1 in 0.16.0 and removed it entirely in 0.28.0, returning HTTP 410 for all v1 requests.
Fixes #407
Supersedes #410
Test plan
/api/v2/silences/api/v2/silence/<id>/api/v2/alerts🤖 Generated with Claude Code