Terraform Monitor Criteria evaluateOverTime not waiting #65

Open
opened 2026-04-05 16:18:47 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @matiaschileno on 2/23/2026

Hello.
Using self-hosted 9.5.0 version and Terraform for creating monitors, I've configured a Monitor Criteria to set Monitor Status to offline when isOnline is false OR Response Status Code is not 200. I would like to do this only if any of the filters match for at least 5 minutes but this is not working, it is not waiting for 5 minutes, it triggers at the first occurrence immediately. What am I missing ?

The monitor interval is set to * * * * * (every minute) and this is my Terraform code for my offline criteria :

...
{
  _type = "MonitorCriteriaInstance"
  value = {
    alerts              = []
    changeMonitorStatus = true
    createAlerts        = false
    createIncidents     = true
    description         = "This criteria checks if the ${each.value.app_name} is offline"
    filterCondition     = "Any"
    filters = [
      {
        checkOn          = "Is Online"
        evaluateOverTime = true
        evaluateOverTimeOptions = {
          evaluateOverTimeType = "All Values"
          timeValueInMinutes   = "5"
        }
        filterType = "False"
      },
      {
        checkOn          = "Response Status Code"
        evaluateOverTime = true
        evaluateOverTimeOptions = {
          evaluateOverTimeType = "All Values"
          timeValueInMinutes   = "5"
        }
        filterType = "Not Equal To"
        value      = 200
      },
    ]
    id = each.value.criteria.offline.id
    incidents = [
      {
        autoResolveIncident = true
        description         = "${each.value.app_name} is currently offline."
        id                  = each.value.criteria.offline.incident_id
        incidentSeverityId = {
          _type = "ObjectID"
          value = local.global.incident_severities.critical
        }
        onCallPolicyIds = []
        title           = "${each.value.app_name} is offline"
      },
    ]
    monitorStatusId = local.global.monitor_statuses.offline
    name            = "Check if ${each.value.app_name} is offline"
  }
}
...

Thank you.

*Originally created by @matiaschileno on 2/23/2026* Hello. Using self-hosted 9.5.0 version and Terraform for creating monitors, I've configured a Monitor Criteria to set Monitor Status to offline when isOnline is false OR Response Status Code is not 200. I would like to do this only if any of the filters match for at least 5 minutes but this is not working, it is not waiting for 5 minutes, it triggers at the first occurrence immediately. What am I missing ? The monitor interval is set to `* * * * *` (every minute) and this is my Terraform code for my offline criteria : ```terraform ... { _type = "MonitorCriteriaInstance" value = { alerts = [] changeMonitorStatus = true createAlerts = false createIncidents = true description = "This criteria checks if the ${each.value.app_name} is offline" filterCondition = "Any" filters = [ { checkOn = "Is Online" evaluateOverTime = true evaluateOverTimeOptions = { evaluateOverTimeType = "All Values" timeValueInMinutes = "5" } filterType = "False" }, { checkOn = "Response Status Code" evaluateOverTime = true evaluateOverTimeOptions = { evaluateOverTimeType = "All Values" timeValueInMinutes = "5" } filterType = "Not Equal To" value = 200 }, ] id = each.value.criteria.offline.id incidents = [ { autoResolveIncident = true description = "${each.value.app_name} is currently offline." id = each.value.criteria.offline.incident_id incidentSeverityId = { _type = "ObjectID" value = local.global.incident_severities.critical } onCallPolicyIds = [] title = "${each.value.app_name} is offline" }, ] monitorStatusId = local.global.monitor_statuses.offline name = "Check if ${each.value.app_name} is offline" } } ... ``` Thank you.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#65