Skip to content

Auto close alerts with 2 different severities #2035

@WallDM48

Description

@WallDM48

Hello, im currently using alerta at daily work. We've configured two types of alert that I want to treat the same. I want when I receive alerts with severity "Ok" and "Normal" to be closed automatically.

Should this be enough for it:

ASI_SEVERITY = [
    'critical', 'page', 'major', 'minor', 'warning', 'indeterminate', 'informational', 'normal', 'ok'
]
SEVERITY_MAP = {
    'critical': 1,
    'page': 2,
    'major': 3,
    'minor': 4,
    'warning': 5,
    'indeterminate': 6,
    'normal': 7,
    'ok': 7,  # Map 'ok' to same level as 'normal'
    'unknown': 9
}
COLOR_MAP = {
    'severity': {
        'critical': 'red',
        'page': '#e307f3ff',
        'major': 'orange',
        'minor': 'yellow',
        'warning': '#1E90FF',
        'indeterminate': 'lightblue',
        'normal': '#00CC00',
        'ok': '#00CC00',  # Same color as 'normal'
        'unknown': 'silver'
    },
    'text': 'black'
}

And whats the difference between ASI_SEVEIRTY and SEVERITY_MAP ?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions