• action - "trigger" or "clear"
  • attributes - dictionary of alert-specific attributes which are being reported
  • description - human-readable explanation
  • name - unique identifier for this alert within the device
  • level - "info", "warn", "error", "fatal"
  • type - the well-known name for the alert type which was triggered

Actions this does:

  1. Checks the mc.alerts.enabled attribute to validate if this device should be reporting alerts. If it is not enabled, the alert is disregarded.
  2. Checks if the alert already exists for the device and disregards if there is no change, or updates if the level is different.
  3. Updates the read only device attribute mc.alerts.active_alerts either adding a new alert, clearing a resolved one or resolving and recreating the alert with the new severity level.
  4. Records the alert to the mission_control_controller data endpoint for logging and replay.
  5. Broadcasts the alert to the enabled account endpoints based on mc.alerts.emitters for the account.

Example Alert Body:

        "action": "trigger",
        "level": "error",
        "type": "mc.data_outside_bounds",
        "description": "The dilithium crystal's resonant frequency is too low. Please add more fuel.",
        "attributes": {
            "remaining_mass": "12.212",
            "frequency": 31211233212321.21
Click Try It! to start a request and see the response here!