Introduce AlertManager v2 integration with improved internal behaviour it's using grouping from AlertManager, not trying to re-group alerts on OnCall side. Existing AlertManager and Grafana Alerting integrations are marked as Legacy with options to migrate them manually now or be migrated automatically after DEPRECATION DATE(TBD). Integration urls and public api responses stay the same both for legacy and new integrations. --------- Co-authored-by: Rares Mardare <rares.mardare@grafana.com> Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
13 lines
365 B
Python
13 lines
365 B
Python
"""
|
|
legacy_prefix.py provides utils to work with legacy integration types, which are prefixed with 'legacy_'.
|
|
"""
|
|
|
|
legacy_prefix = "legacy_"
|
|
|
|
|
|
def has_legacy_prefix(integration_type: str) -> bool:
|
|
return integration_type.startswith(legacy_prefix)
|
|
|
|
|
|
def remove_legacy_prefix(integration_type: str) -> str:
|
|
return integration_type.removeprefix(legacy_prefix)
|