Skip to content

Ability to override priority #28

@majormoses

Description

@majormoses

This was created to discuss #27 by @Castaglia at a high level on the methodology before jumping into specific code.

Currently the handler creates incidents/events/alerts (whatever the right terminology for opsgenie is) in the default Priority which is P3. Ideally we should be able to change that based on various factors.

When I consider an incidents urgency there are usually several factors at play and as such I think we should outline how we would like this to work as there are different schools of thought on this matter. To best illustrate how I think we should proceed I pose the following scenarios and ask for feedback.

We should consider overrides beyond at the check level to include the handler and client level config. When supplied more than one location (such as check + handler) who's config takes precendence. To better illustrate I pose the following scenarios:

Environments

Not all environments are equal I might want to ensure that non production environments have a low default priority and a higher default in production.

Checks

Not all checks have equal priority, a caching service failing and my database service failing are two very different things.

Some clients are more important than others

My database nodes and application nodes very differently in how I respond to incidents. A disk at 90% on an app node that does not write much to disk and the same percentage on my database node are different.

My thoughts

I think given the above I think we want to create 2 types of priorities:

  • default priorities, this could be set at the check, client, or handler level with that order of precendence
  • override priorities, this could be set at the handler, client, check level with that order of precedence

Why default priorities and the precedence proposed

Well to allow an admin to say default in production I want things to be P4 but allow overriding (higher|lower) on per client or check basis. In this case the most specific is the check definition so it wins that one.

Why override priorities and the precedence proposed

In non production environments you might say nothing is ever above a P4 as that might mean drop whatever you are doing and this prevents configuration on a check level being overridden as you specified this at the handler level.

Feedback

This was just my initial reaction to the feature and look forward to hearing what others have to say on this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions