Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Feature Idea: Timeframe for alerts to fire and create an incident

alerts
feature-request
metrics
feature-idea
rfb

#1

Hi,

I want to request a feature idea for Alerts.

Want to have a feature that allows to set the time in which alert policy will trigger an incident.

Some alerts need to only track actions during the business day and should not create incident during night time.

The alert that I was trying to setup is

But there is no way to mention that only monitor for business hours.

Please let me know if more details are required.

thanks

CC @Linds @hross


New Relic edit

  • I want this too
  • I have more to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


Unable to fetch the data in NRQL for past 24 hours data due to "SINCE " command cannot be used in NRQL alert.My requirement is that i need to get the usage of my NR APM account
#2

@MKhanna - Yup!! A maintenance window-esque style feature for Alerts is commonly requested. I have added a poll here for others to weigh in on, and submitted this internally to the Alerts team as well!

Note that other’s have had success by scripting API calls to be run at certain times of the day to enable or disable conditions - check out the docs here:

https://docs.newrelic.com/docs/alerts/rest-api-alerts/new-relic-alerts-rest-api/rest-api-calls-new-relic-alerts#conditions-update


#3

Hi @RyanVeitch

Thanks for the update, unfortunately, doing custom api setup are now starting to get hard to manage as we have to manage separate inventory of what is running via the apis and the scripts etc…

And being a small shop it kind of get complicated with more and more such additions, hence if these things can be out of the box functionality it will avoid the tech debt that I would create to do simple tasks.

Hope it does make sense.

thanks


#4

Hey @MKhanna,

Had a similar issue and one option we used was to alert as a NRQL Query (which is becoming our alert method of choice btw). I wanted to ignore any errors in the 2am-3am window.

SELECT count(*) from SyntheticCheck where monitorName = 'MonitorA' and result != 'SUCCESS' and hourof(timestamp) not in ('2:00')

Guess it will depend on what you want to test as to how easy this is to NRQL…


#5

@MKhanna - Understandable, it’s not the ideal solution. Our product management team do look here on the community, so the Feature Request I have filed and the poll here with more people’s interest should help. :smiley:


#6

Hi @bevan

thank you for the share, how did you mention the time range? did 2:00 do the trick for that hour?

I want to go for more 5:00 PM to 9:00 AM next day and thats where I was struggling with the condition.

thanks


#7

Correct @MKhanna, the hourOf(timestamp) comparison will take the whole hour. You may have to play with 24 hour formats to get it to work correctly. So your hour statement will probably start with 17:00 and end with 09:00. Unfortunately you have to list every hour in between.


#8

Hi @stefan_garnham @bevan

thank you for the response, but what was concerning in this case was even though I go every hour, how will I ensure the time 00:00,01:00,…08:00 are taking from next day not previous day.because query will look something like this.

SELECT count(*) from Transaction where appName = ‘APPNAME’ and library.CXF.soap.Message Name =‘value’ and hourof(timestamp) not in(‘17:00’,‘18:00’,‘19:00’,‘20:00’,‘21:00’,‘22:00’,‘23:00’,‘00:00’,‘01:00’,‘02:00’,‘03:00’,‘04:00’,‘05:00’,‘06:00’,‘07:00’,‘18:00’) since 1 day ago
when I run the query without the time stamp condition I get 108K transactions
when I add it the cound should reduce, which does not happen.

So I am not sure if I have something wrong in the condition.

One thing I though was I can go other way as instead of not in I can do in and then go 9:00 to 17:00 each out it will inspect and give the result.will try this too.

thanks for the help agian :slight_smile:


#9

Don’t forget WITH TIMEZONE otherwise all the timestamps will be calculated as UTC


#10

I was thinking of same idea to request today, @MKhanna you read me. :slight_smile:

@stefan_garnham Hope you would liked as well ?


#11

The timestamp doesnt need the leading ‘0’.
As you need multiple hours, this works (but’s not pretty) -

SELECT count(*) from SyntheticCheck facet hourOf(timestamp) where hourOf(timestamp) not in ('0:00') AND hourOf(timestamp) not in ('1:00') since 1 day ago

I only used ‘facet’ so you can see the data being removed…


#12

Hi @bevan

again, when you used 0 and 1 you covered 2 hours right? I was trying to figure out if we can range the time in? or ensure the 1 day is considered. Still trying to figure out the right math, as problem with this alert will be when it fires it will take the time from that instance - 1 day which can covers yesterday also.

I am still trying to understand the whole mechanism.

thanks :slight_smile:


#13

Yes, so I’m effectively excluding anything from 00:00 until 02:00. Don’t think you can do a range. like 00:00 to 02:00.

Remember the alert is testing a relative period (value over 50 in past 5 minutes) so it doesn’t care if it’s today or yesterday, the NRQL is just allowing a WHERE clause to be used that isn’t available in the APM define threshold template (i.e. the feature request).


#14

Hi,

I’m wondering If you have considered allowing timeframe to be configured through the UI, as requested in this feature idea. This is something I considered a basic feature that even tools that are not focused in alerting policies provide, for example Datadog. We are actually thinking of moving to that platform for managing alerts due to the lack of support in New Relic.

I think you should think about giving the product more flexibility for managing the fact that alert scenarios are different during day & night. If We have a throughput of 2 users at 3AM and one request fails due to a temporal error, then We will have an error rate of 50%, which will trigger an alarm for a very few number of incidents. That is a false positive.

Currently we have no a clear path for solving this kind of issue via NR UI.


#15

Hey everyone in this thread!

We just launched Alerts Muting Rules. This should help you set up periods of time during which you will not be notified, per your request.

Check out the docs here: https://docs.newrelic.com/docs/alerts/new-relic-alerts/managing-notification-channels/muting-rules-suppress-notifications

Feel free to post over in #support-products-agents:alerts if you have any questions on Muting Rules!

Thanks for your suggestions!