Alerts

Alerts notify you when equipment requires attention, either due to anomalous sensor readings or predictive maintenance recommendations.

The alert model

The alert model defines how notifications are generated and managed in your predictive maintenance workflow.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the alert.

  • Name
    type
    Type
    string
    Description

    Type of alert (threshold, anomaly, prediction).

  • Name
    severity
    Type
    string
    Description

    Alert severity level (critical, warning, info).

  • Name
    equipment_id
    Type
    string
    Description

    ID of the affected equipment.

  • Name
    sensor_id
    Type
    string
    Description

    ID of the triggering sensor (if applicable).

  • Name
    message
    Type
    string
    Description

    Human-readable description of the alert.

  • Name
    created_at
    Type
    string
    Description

    When the alert was generated.

  • Name
    status
    Type
    string
    Description

    Current status (active, acknowledged, resolved).

Configure alert rules

Create an alert rule

curl -X POST https://api.immune.dev/v1/alert-rules \
  -H "Authorization: Bearer {token}" \
  -d '{
    "name": "High Temperature Alert",
    "equipment_id": "pump_001",
    "sensor_id": "temp_001",
    "conditions": {
      "type": "threshold",
      "parameter": "temperature",
      "operator": "gt",
      "value": 85,
      "duration": "5m"
    },
    "severity": "critical",
    "notifications": {
      "channels": ["email", "slack"],
      "recipients": ["maintenance-team"]
    }
  }'

List active alerts

List active alerts

curl -X GET https://api.immune.dev/v1/alerts \
  -H "Authorization: Bearer {token}" \
  -d status="active" \
  -d severity="critical,warning"

Update alert status

Acknowledge an alert

curl -X PATCH https://api.immune.dev/v1/alerts/alert_123 \
  -H "Authorization: Bearer {token}" \
  -d '{
    "status": "acknowledged",
    "comment": "Maintenance team dispatched"
  }'

Alert notifications

Configure how and where alerts are delivered:

Configure notification settings

curl -X POST https://api.immune.dev/v1/notification-settings \
  -H "Authorization: Bearer {token}" \
  -d '{
    "channels": {
      "email": {
        "enabled": true,
        "recipients": ["maintenance@company.com"]
      },
      "slack": {
        "enabled": true,
        "workspace": "company-maintenance",
        "channel": "#alerts"
      },
      "sms": {
        "enabled": true,
        "numbers": ["+1234567890"]
      }
    },
    "rules": {
      "critical": ["email", "sms", "slack"],
      "warning": ["email", "slack"],
      "info": ["slack"]
    }
  }'

Best practices

  1. Set appropriate threshold levels
  2. Configure escalation paths
  3. Define clear notification rules
  4. Document alert response procedures
  5. Regularly review alert patterns
  6. Maintain up-to-date contact information

Was this page helpful?