Skip to content

Allow Escalation Policy Conditions Based on On-Call User's Local Daytime #5512

Open
@chamini2

Description

@chamini2

What would you like to see!

Currently, Grafana OnCall escalation policies allow for time-based conditions using fixed UTC time windows (e.g., "Continue escalation if current UTC time is in X to Y"). This is insufficient for teams with members in different timezones who want to manage alert notifications based on the local time of day for the person currently on call.

Our team runs 24/7 on-call shifts, often spanning a full week per person. While we accept necessary interruptions for high-priority issues, we want to automatically delay or use less intrusive notifications for low-priority alerts that occur during the on-call person's local nighttime hours.

The current UTC-based condition doesn't work because a fixed UTC window represents different local times for different users. Workarounds like manually configuring time-based muting in Alertmanager require weekly manual updates tied to the specific on-call person's schedule and timezone, which defeats the purpose of using Grafana OnCall's scheduling capabilities.

Product Area

Alert Flow & Configuration

Anything else to add?

Possible solution

We request the ability to define escalation policy conditions based on the local time of day of the user currently assigned by the schedule.

This could be implemented in a few ways:

  • Option A: New Condition Type: A new condition type like "Proceed only if assigned user's local time is between HH:MM and HH:MM". Grafana OnCall would use the assigned user's profile timezone to evaluate this condition dynamically.
  • Option B: Expose Variables: Expose variables related to the assigned user's local time within the existing condition evaluation logic. For example, allowing conditions like {{ oncall_user.local_hour >= 8 && oncall_user.local_hour < 18 }}. (Syntax is just an example).

If this is accepted as a good idea, I can try to implement myself!

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