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

AlertManager v2 #2643

Merged
merged 50 commits into from
Aug 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4d5fa44
First pass on AlertManager v2
Konstantinov-Innokentii Jul 24, 2023
1a24597
Introduce legacy_prefix package
Konstantinov-Innokentii Jul 24, 2023
a3d41fe
Merge branch 'dev' into grafana_alerting_v2
Konstantinov-Innokentii Jul 25, 2023
bd731f9
Use set literal for INTEGRATION_TYPES
Konstantinov-Innokentii Jul 25, 2023
7d9c9e7
Add migrate endpoint for integration
Konstantinov-Innokentii Jul 25, 2023
1422bd1
Temporary allow creating legacy integrations
Konstantinov-Innokentii Jul 25, 2023
1f685ef
Merge branch 'dev' into amv2
Konstantinov-Innokentii Jul 26, 2023
22f79e6
Update CHANGELOG.md
Konstantinov-Innokentii Jul 26, 2023
802dd63
Merge remote-tracking branch 'origin/amv2' into amv2
Konstantinov-Innokentii Jul 26, 2023
cb18375
Decouple GrafanaAPIView from AlertManagerAPIView
Konstantinov-Innokentii Jul 26, 2023
342cfaf
based_on_alertmanager naming
Konstantinov-Innokentii Jul 26, 2023
06b865a
Hack to keep demo alert working for integration with legacy AM behaviour
Konstantinov-Innokentii Jul 26, 2023
fe903b7
Add migration
Konstantinov-Innokentii Jul 26, 2023
2c4084c
frontend changes
teodosii Jul 27, 2023
629f46c
fixed updateItems by passing the page param
teodosii Jul 27, 2023
13b6a83
isLegacy check
teodosii Jul 27, 2023
4d29d48
Draft docs
Konstantinov-Innokentii Jul 27, 2023
0234c71
Docs iteration
Konstantinov-Innokentii Jul 28, 2023
58d7f59
Docs polishing
Konstantinov-Innokentii Jul 28, 2023
2c7940a
Docs polishing
Konstantinov-Innokentii Jul 28, 2023
f200d95
Add annotations to payload example
Konstantinov-Innokentii Jul 28, 2023
f5cdbf5
Merge branch 'dev' into amv2
Konstantinov-Innokentii Jul 28, 2023
cbe4328
Text polishing
Konstantinov-Innokentii Jul 28, 2023
052ae46
Fix typos
Konstantinov-Innokentii Jul 28, 2023
046636a
Merge remote-tracking branch 'origin/dev' into amv2
Konstantinov-Innokentii Jul 28, 2023
a67f92f
Temporary remove migration
Konstantinov-Innokentii Jul 28, 2023
78ed3ef
Fix Changelog
Konstantinov-Innokentii Jul 28, 2023
05e4ee8
frontend changes
teodosii Jul 28, 2023
d6d91e6
linter
teodosii Jul 28, 2023
fef74ea
ui display changes
teodosii Jul 28, 2023
6e7253d
Polishing
Konstantinov-Innokentii Jul 31, 2023
166cf97
Merge branch 'dev' into amv2
Konstantinov-Innokentii Jul 31, 2023
dc468c1
Fix tests
Konstantinov-Innokentii Jul 31, 2023
54cbfa6
Comments polishing
Konstantinov-Innokentii Jul 31, 2023
c17dd28
Add migration
Konstantinov-Innokentii Jul 31, 2023
d9b70d8
Docs polishing
Konstantinov-Innokentii Jul 31, 2023
38e20c3
Comment polishing
Konstantinov-Innokentii Jul 31, 2023
16da5c1
Refresh templates on migration
Konstantinov-Innokentii Jul 31, 2023
283282d
Merge branch 'dev' into amv2
joeyorlando Jul 31, 2023
f4630bc
Update docs/sources/integrations/alertmanager/index.md
Konstantinov-Innokentii Aug 1, 2023
029abef
Merge branch 'dev' into amv2
Konstantinov-Innokentii Aug 1, 2023
58ffe1b
Rename migrateChannelFiter to migrateChannel
Konstantinov-Innokentii Aug 1, 2023
a228f83
Remove excess function
Konstantinov-Innokentii Aug 1, 2023
c08937c
Skip test_related_shifts
Konstantinov-Innokentii Aug 1, 2023
5fe2dbb
Fix migration
Konstantinov-Innokentii Aug 1, 2023
a5c05ad
Polishing
Konstantinov-Innokentii Aug 1, 2023
b6bc830
Add migration Date on frontend
Konstantinov-Innokentii Aug 1, 2023
237cce1
Fix tests
Konstantinov-Innokentii Aug 1, 2023
4a01a81
Skip test_related_shifts
Konstantinov-Innokentii Aug 1, 2023
595e7ac
Update CHANGELOG.md
Konstantinov-Innokentii Aug 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hack to keep demo alert working for integration with legacy AM behaviour
  • Loading branch information
Konstantinov-Innokentii committed Jul 26, 2023
commit 06b865a2608beed680c2365f2a29eaa0f44296d1
8 changes: 6 additions & 2 deletions engine/apps/alerts/models/alert_receive_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,12 @@ def send_demo_alert(self, payload=None):
if payload is None:
payload = self.config.example_payload

# TODO: AMV2 - Deprecated. After all alertmanager based integration will be migrated to v2 should be removed.
if self.based_on_alertmanager:
# TODO: AMV2: hack to keep demo alert working for integration with legacy alertmanager behaviour.
Copy link
Contributor

@iskhakov iskhakov Aug 1, 2023

Choose a reason for hiding this comment

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

Could you provide more clear instruction what should be done here and when?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I can't. We still have GRAFANA integration which might or might not have legacy alertmanager behaviour and that's why there is no clear instruction what to do. I'll remove TODO.

if self.integration in {
AlertReceiveChannel.INTEGRATION_LEGACY_GRAFANA_ALERTING,
AlertReceiveChannel.INTEGRATION_LEGACY_ALERTMANAGER,
AlertReceiveChannel.INTEGRATION_GRAFANA,
}:
alerts = payload.get("alerts", None)
if not isinstance(alerts, list) or not len(alerts):
raise UnableToSendDemoAlert(
Expand Down