Create alerts to send during a specific time period

Is there a way to setup alerts to only send at a specific time. I only want to receive alerts from 6am-10pm.

Hi, @rwhite1: There are a couple of options:

  • You can use the new muting rules feature to specify that notifications should not be sent outside the desired hours

  • You can create alert conditions based on NRQL queries. In addition to the threshold you wish to monitor, the queries can contain a time window:

    ... WHERE hourOf(timestamp) > '06:00' 
          AND hourOf(timestamp) < '22:00'
        WITH TIMEZONE 'America/Denver'
    
3 Likes

hi @philweber - could you post or share an example of setting the outside desired hours using muting rules? I’m not following where this is set in the documentation and whether this is an attribute of the policy or the alert event?

1 Like

Hello @Jennie.G.Pengelly, To clarify here, Muting rules allows to suppress alert notifications during maintenance windows. You would have to manually enable or disable the muting rule during the hours that you would not want to be notified for alert violations. You can do this by setting enabled: true in the muting rule.
Having said that, I’d like to point out that automatically scheduling these rules is on the roadmap :slight_smile:

Until then, you could use the second option mentioned by @philweber to schedule alerts :slight_smile:

3 Likes

Any updates on being able to schedule alerts? This would be extremely helpful and I’m hoping it’s nearing release since it’s been almost 2 years since the previous comment about being on the roadmap.

Hi, @Matt.Nohelty1: The ability to schedule muting rules was on the roadmap, and is now available: Muting rules: Suppress notifications | New Relic Documentation.