Configs

Update the sub-configurations under alarm

put/configs/alarm

Request

  • Base URL: https://docs.emqx.com/api/v5
  • URL: https://docs.emqx.com/api/v5/configs/alarm
  • Auth: one of:
    • HTTP basic
    • bearerAuth (a scheme the document does not define)

Request body

actionsstring[]

The actions triggered when the alarm is activated.<br/>Currently, the following actions are supported: <code>log</code> and <code>publish</code>.<br/><code>log</code> is to write the alarm to log (console or file).<br/><code>publish</code> is to publish the alarm as an MQTT message to the system topics:<br/><code>$SYS/brokers/emqx@xx.xx.xx.x/alarms/activate</code> and<br/><code>$SYS/brokers/emqx@xx.xx.xx.x/alarms/deactivate</code>

size_limitinteger

The maximum total number of deactivated alarms to keep as history.<br/>When this limit is exceeded, the oldest deactivated alarms are deleted to cap the total number.<br/>

validity_periodstring

Retention time of deactivated alarms. Alarms are not deleted immediately<br/>when deactivated, but after the retention time.<br/>

Example request

{
  "actions": [
    "log",
    "publish"
  ],
  "size_limit": 1000,
  "validity_period": "24h"
}

Response

actionsstring[]

The actions triggered when the alarm is activated.<br/>Currently, the following actions are supported: <code>log</code> and <code>publish</code>.<br/><code>log</code> is to write the alarm to log (console or file).<br/><code>publish</code> is to publish the alarm as an MQTT message to the system topics:<br/><code>$SYS/brokers/emqx@xx.xx.xx.x/alarms/activate</code> and<br/><code>$SYS/brokers/emqx@xx.xx.xx.x/alarms/deactivate</code>

size_limitinteger

The maximum total number of deactivated alarms to keep as history.<br/>When this limit is exceeded, the oldest deactivated alarms are deleted to cap the total number.<br/>

validity_periodstring

Retention time of deactivated alarms. Alarms are not deleted immediately<br/>when deactivated, but after the retention time.<br/>

Example response

{
  "actions": [
    "log",
    "publish"
  ],
  "size_limit": 1000,
  "validity_period": "24h"
}

Changes

No recorded changes to this operation across all 1 revision of this API.