Skip to main content

Create rule

POST 

/rules

Create rule.

Authorization Action:

ruleengine:rules:create

Request

Body

required
    name stringrequired
    severity string

    Possible values: [info, warning, critical]

    description string
    processable string

    Possible values: [enabled, disabled]

    Default value: enabled

    tags object[]
  • Array [
  • label stringrequired
    labelValue stringrequired
    metadata object

    Other custom properties associated to the tag

  • ]
  • notification objectrequired
    messages object[]required
  • Array [
  • target string

    Notification target: can be an email address, a phone number or a telegram account. If not specified, the notification target is set to the user that created the rule.

    policy stringrequired

    Possible values: [trigger, reentry]

    medium stringrequired

    Possible values: [email, telegram, sms, slack, discord, fcm, msteams]

    text stringrequired
  • ]
  • conditions object[]required
  • Array [
  • params objectrequired
    oneOf
    metric stringrequired

    URN of the metric to be monitored

    threshold numberrequired
    comparisonOperator stringrequired

    Possible values: [>, >=, <, <=, ==, !=]

    unit string
    durationSecs numberrequired

    Possible values: <= 86400

    activeWindow object
    from stringrequired

    Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/

    to stringrequired

    Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/

    timezone stringrequired

    IANA timezone identifier

    type stringrequired

    Possible values: [threshold, lastMessageOlderThan, delta]

  • ]

Responses

Schema
    conditions object[]required
  • Array [
  • params objectrequired
    oneOf
    metric stringrequired

    URN of the metric to be monitored

    threshold numberrequired
    comparisonOperator stringrequired

    Possible values: [>, >=, <, <=, ==, !=]

    unit string
    durationSecs numberrequired

    Possible values: <= 86400

    activeWindow object
    from stringrequired

    Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/

    to stringrequired

    Possible values: Value must match regular expression /^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/

    timezone stringrequired

    IANA timezone identifier

    status stringrequired

    Possible values: [active, inactive]

    createdAt date-timerequired
    updatedAt date-timerequired
    deletedAt date-timerequired
    type stringrequired

    Possible values: [threshold, lastMessageOlderThan, delta]

    id stringrequired
  • ]
  • tags object[]required
  • Array [
  • createdAt date-timerequired
    updatedAt date-timerequired
    deletedAt date-timerequired
    label stringrequired
    labelValue stringrequired
    metadata object

    Other custom properties associated to the tag

    id stringrequired
  • ]
  • status stringrequired

    Possible values: [active, inactive]

    createdAt date-timerequired
    updatedAt date-timerequired
    deletedAt date-timerequired
    name stringrequired
    severity string

    Possible values: [info, warning, critical]

    description string
    processable string

    Possible values: [enabled, disabled]

    Default value: enabled

    notification objectrequired
    messages object[]required
  • Array [
  • target string

    Notification target: can be an email address, a phone number or a telegram account. If not specified, the notification target is set to the user that created the rule.

    policy stringrequired

    Possible values: [trigger, reentry]

    medium stringrequired

    Possible values: [email, telegram, sms, slack, discord, fcm, msteams]

    text stringrequired
  • ]
  • id stringrequired
Loading...