Skip to content

mixpanel_custom_alert (Resource)

Manages a Mixpanel custom alert (mixpanel_custom_alert) — an automated monitoring rule that evaluates a saved report on a schedule and sends notifications when specified conditions are met.

Example Usage

resource "mixpanel_custom_alert" "signup_drop" {
  project_id  = 1234567
  name        = "Signup drop alert"
  bookmark_id = 123
  frequency   = 3600
  paused      = false
  condition   = jsonencode({
    operator = "less_than"
    value    = 100
  })
}

Schema

Required

  • bookmark_id (Number)
  • frequency (Number)
  • name (String)
  • paused (Boolean)

Optional

  • condition (String)
  • custom_alert_id (Number)
  • notification_windows (Attributes) Notification windows configuration for an alert. (see below for nested schema)
  • project_id (Number)
  • subscriptions (String)

Read-Only

  • id (Number) The ID of this resource.

Nested Schema for notification_windows

Required:

  • enabled (Boolean) Whether notification windows are active

Optional:

Nested Schema for notification_windows.windows

Required:

  • end_day (Number) End day: 0-6 (same week), 7-13 (next week)
  • end_time (String) End time in HH:MM format
  • start_day (Number) Start day: 0-6 (Mon-Sun)
  • start_time (String) Start time in HH:MM format

Import

Custom alerts can be imported using the composite PROJECT_ID:ID format:

import {
  to = mixpanel_custom_alert.signup_drop
  id = "1234567:890"
}
terraform import mixpanel_custom_alert.signup_drop 1234567:890