What is the use of time_function in Alerts?

###Alerts Question Template

  • Please describe what are you seeing:

I have been trying to figure out what exactly is the use of time function in New Relic Alerts, but haven’t found any documentation or post around it yet. What exactly is the use of time_function? How does value of ‘all’ or ‘any’ affect the alerts?

Here is a link to terraform new relic provider which takes time_function as an input:https://www.terraform.io/docs/providers/newrelic/r/alert_condition.html

Helpful Resources
Relic Solution: The key to consistent alert notifications

Troubleshooting downtime document

Hello @siddhant.agarwal,

The time_function value allows you to set for at least or at least once in threshold values for an alert condition.

Here’s some clarification on setting alerts with for at least or at least once in thresholds:

for at least : when the threshold is set as for at least , the alert condition will only violate when the threshold is breached continuously for the set time period.

at least once in : At least once in ‘x’ minutes threshold is more sensitive. It means that the threshold only has to breach at least once in the set time period before an alert is generated.

Hope that helps :slight_smile:

3 Likes

That explains the use of any and all. Thanks for the clarification.

2 Likes