Alerts

get

Returns alert events divided into pages. Allows to specify page number and page size.

Path parameters
environmentstringRequired
Query parameters
pageintegerOptional

The page number to be returned, must be greater than zero. Defaults to 1.

Example: 1
pageSizeintegerRequired

The elements amount on a single page, must be greater than zero.

Example: 25
summarystringOptional

Allows to filter results by partial summary text

Example: active controllers
categorystringOptional

Allows to filter results by category. Accepted values are: 'Infrastructure', 'Consumers', 'Kafka Connect', 'Topics' )

Example: Infrastructure
levelstringOptional

Allows to filter results by level

Example: INFO
alertIdintegerOptional

Allows to filter results by alert id

Example: 1000
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/alert/events
GET /api/v1/environments/{environment}/proxy/api/v1/alert/events?pageSize=1 HTTP/1.1
Host: 
Accept: */*
{
  "values": [
    {
      "level": "text",
      "category": "text",
      "tags": [
        "text"
      ],
      "instance": "text",
      "summary": "text",
      "docs": "text",
      "timestamp": 1,
      "alertId": 1,
      "map": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "lrn": "text"
    }
  ],
  "pagesAmount": 1,
  "totalCount": 1
}
get
Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequiredExample: 5000Possible values:
condition_idstring · uuidRequired
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id}
GET /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: 
Accept: */*
{
  "createdAt": "2021-01-01T00:00:00Z",
  "createdBy": "john-doe",
  "modifiedAt": "2021-01-01T00:00:00Z",
  "modifiedBy": "joe-bloggs",
  "channels": [
    {
      "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
      "name": "slow-consumers-alerts",
      "templateName": "Webhook"
    }
  ],
  "condition": "",
  "conditionDsl": {
    "connectionName": "kafka",
    "datasetName": "positions",
    "threshold": {
      "type": "more_than",
      "messages": 100
    },
    "duration": "end_of_each_day"
  }
}
put
Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequired

The Alert ID to enable

Example: 2000Possible values:
condition_idstring · uuidRequired

The condition unique identifier

Example: 8ce90f4a-514b-45fc-a12e-268bc69525f5
Body
conditionone ofRequired
objectOptional

JSON Schema representation of the configuration properties

or
stringOptional
channelsstring[]Optional
Responses
200Success

No content

put
/api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id}
PUT /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "condition": {},
  "channels": [
    "text"
  ]
}

No content

delete
Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequired

The Alert ID to enable

Example: 2000Possible values:
condition_idstring · uuidRequired

The condition unique identifier

Example: 8ce90f4a-514b-45fc-a12e-268bc69525f5
Responses
200Success

No content

delete
/api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id}
DELETE /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: 
Accept: */*

No content

get
Path parameters
environmentstringRequired
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v2/alert/settings
GET /api/v1/environments/{environment}/proxy/api/v2/alert/settings HTTP/1.1
Host: 
Accept: */*
{
  "categories": {
    "Kafka Connect": [],
    "Infrastructure": [
      {
        "id": 1000,
        "description": "Kafka Broker is down",
        "category": "Infrastructure",
        "enabled": true,
        "isAvailable": true,
        "details": {
          "alertType": "Fixed",
          "channels": [
            {
              "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
              "name": "PagerDuty-incidents-prd",
              "templateName": "Pagerduty"
            }
          ],
          "conditionDsl": {
            "enabled": true,
            "restarts": 3,
            "gracePeriod": 120
          },
          "modifiedBy": "user",
          "modifiedAt": "2023-04-20T09:00:00Z"
        },
        "lrn": "alerts:rule:my-dev/Infrastructure/1000"
      }
    ],
    "Topics": [],
    "Consumers": [
      {
        "id": 2000,
        "description": "Consumer Lag exceeded",
        "category": "Consumers",
        "enabled": true,
        "conditionTemplate": "lag >= $Threshold-Number on group $Consumer-Group and topic $Topic-Name",
        "conditionRegex": "lag >= ([1-9][0-9]*) on group (\\b\\S+\\b) and topic (\\b\\S+\\b)",
        "docs": "Raises an alert when the consumer lag exceeds the threshold on any partition.",
        "isAvailable": true,
        "details": {
          "conditions": {
            "94d78565-db0b-4683-8d7d-6a0e6b8f2292": {
              "createdAt": "2021-01-01T00:00:00Z",
              "createdBy": "john-doe",
              "modifiedAt": "2021-01-01T00:00:00Z",
              "modifiedBy": "joe-bloggs",
              "channels": [
                {
                  "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
                  "name": "slow-consumers-alerts",
                  "templateName": "Webhook"
                }
              ],
              "condition": "lag >= 4000 on group group and topic positions",
              "conditionDsl": {
                "group": "group",
                "topic": "positions",
                "threshold": 4000,
                "mode": "PerPartitionMode"
              }
            }
          },
          "alertType": "Conditional"
        },
        "lrn": "alerts:rule:my-dev/Consumers/2000"
      }
    ],
    "Data Produced": [
      {
        "id": 5000,
        "description": "Data Produced",
        "category": "Data Produced",
        "enabled": true,
        "docs": "Raises an alert when the data produced on a topic doesn't match expected threshold",
        "isAvailable": true,
        "details": {
          "conditions": {
            "8ce90f4a-514b-45fc-a12e-268bc69525f5": {
              "createdAt": "2021-01-01T00:00:00Z",
              "createdBy": "john-doe",
              "modifiedAt": "2021-01-01T00:00:00Z",
              "modifiedBy": "joe-bloggs",
              "channels": [
                {
                  "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
                  "name": "data-produced-alarm",
                  "templateName": "Webhook"
                }
              ],
              "condition": "<error>",
              "conditionDsl": {
                "connectionName": "kafka",
                "datasetName": "positions",
                "threshold": {
                  "type": "more_than",
                  "messages": 4000
                },
                "duration": "PT15M"
              },
              "conditionState": {
                "messagesProduced": 100,
                "lastCheck": "2021-01-01T00:00:00Z"
              }
            }
          },
          "alertType": "Conditional"
        },
        "lrn": "alerts:rule:my-dev/Data Produced/5000"
      }
    ],
    "Apps": [
      {
        "id": 1000,
        "description": "Kafka Broker is down",
        "category": "Infrastructure",
        "enabled": true,
        "isAvailable": true,
        "details": {
          "alertType": "Fixed",
          "channels": [
            {
              "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
              "name": "PagerDuty-incidents-prd",
              "templateName": "Pagerduty"
            }
          ],
          "conditionDsl": {
            "enabled": true,
            "restarts": 3,
            "gracePeriod": 120
          },
          "modifiedBy": "user",
          "modifiedAt": "2023-04-20T09:00:00Z"
        },
        "lrn": "alerts:rule:my-dev/Infrastructure/1000"
      }
    ]
  }
}
put

update of a fixed alert setting

Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequired

The Alert ID to enable

Example: 1000Possible values:
Body
enabledbooleanRequired
channelsstring[]Optional
configobjectOptional

JSON Schema representation of the configuration properties

Responses
200Success
application/json
put
/api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id}
PUT /api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "enabled": true,
  "channels": [
    "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd"
  ],
  "config": {
    "enabled": true,
    "restarts": 5,
    "gracePeriod": 60
  }
}
{
  "message": "text"
}
patch

partial update of a fixed alert setting

Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequired

The Alert ID to enable

Example: 1000Possible values:
Body
enabledbooleanOptional
channelsstring[]Optional
configobjectOptional

JSON Schema representation of the configuration properties

Responses
200Success
application/json
patch
/api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id}
PATCH /api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 125

{
  "enabled": true,
  "channels": [
    "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd"
  ],
  "config": {
    "enabled": true,
    "restarts": 3,
    "gracePeriod": 120
  }
}
{
  "message": "text"
}
post
Path parameters
environmentstringRequired
alert_setting_idinteger · enumRequired

The Alert ID to enable

Example: 2000Possible values:
Body
conditionone ofRequired
objectOptional

JSON Schema representation of the configuration properties

or
stringOptional
channelsstring[]Optional
Responses
201Success
application/json
post
/api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions
POST /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "condition": {
    "group": "group1",
    "topic": "__topology",
    "threshold": 4000,
    "mode": "PerPartitionMode"
  },
  "channels": [
    "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}
get

Lists alert channels ordered by their creation time (most recent first)

Path parameters
environmentstringRequired
Query parameters
pageintegerOptional

The page number to be returned, must be greater than zero. Defaults to 1.

Example: 1
pageSizeintegerRequired

The elements amount on a single page, must be greater than zero.

Example: 25
templateNamestringOptional

Filter by channel template name

channelNamestringOptional

Matches channels by name

sortFieldstring · enumOptional

The field to sort results by

Possible values:
sortOrderstring · enumOptional

Sorting order. Defaults to ascending

Possible values:
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/alert/channels
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channels?pageSize=1 HTTP/1.1
Host: 
Accept: */*
{
  "values": [
    {
      "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
      "name": "kafka-prd-health",
      "templateName": "Slack",
      "templateVersion": 1,
      "connectionName": "slack-connection",
      "properties": [
        {
          "key": "channel",
          "value": "#my-kafka-health-prd"
        }
      ],
      "createdAt": "2021-01-01T00:00:00Z",
      "createdBy": "joe.bloggs",
      "updatedAt": "2021-01-01T00:00:00Z",
      "updatedBy": "joe.bloggs",
      "enabled": true,
      "lrn": "lrn"
    }
  ],
  "pagesAmount": 1,
  "totalCount": 1
}
post

The JSON object representing the properties to set this channel with

Path parameters
environmentstringRequired
Body
namestringRequired
templateNamestringRequired
connectionNamestringRequired
propertiesObjectobjectOptional

JSON Schema representation of the configuration properties

Responses
201Success
application/json
post
/api/v1/environments/{environment}/proxy/api/v1/alert/channels
POST /api/v1/environments/{environment}/proxy/api/v1/alert/channels HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 150

{
  "name": "kafka-prd-health",
  "templateName": "Slack",
  "connectionName": "slack-connection",
  "properties": [
    {
      "key": "channel",
      "value": "#my-kafka-health-prd"
    }
  ]
}
{
  "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd"
}
get

Get the alert channel details

Path parameters
environmentstringRequired
idstring · uuidRequired

The channel id

Example: 2c1fc20d-59b4-4f67-8982-6e0377e8fdbd
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id}
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: 
Accept: */*
{
  "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
  "name": "kafka-prd-health",
  "templateName": "Slack",
  "templateVersion": 1,
  "connectionName": "slack-connection",
  "properties": [
    {
      "key": "channel",
      "value": "#my-kafka-health-prd"
    }
  ],
  "createdAt": "2021-01-01T00:00:00Z",
  "createdBy": "joe.bloggs",
  "updatedAt": "2021-01-01T00:00:00Z",
  "updatedBy": "joe.bloggs",
  "enabled": true,
  "lrn": "lrn"
}
put

Update alert channel

Path parameters
environmentstringRequired
idstring · uuidRequired

The channel id

Example: 2c1fc20d-59b4-4f67-8982-6e0377e8fdbd
Body
namestringRequired
connectionNamestringRequired
enabledbooleanOptional
propertiesObjectobjectOptional

JSON Schema representation of the configuration properties

Responses
200Success

No content

put
/api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id}
PUT /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "name": "kafka-prd-health",
  "connectionName": "slack-connection",
  "properties": [
    {
      "key": "channel",
      "value": "#my-kafka-health-prd"
    }
  ]
}

No content

delete

Permanently delete a channel

Path parameters
environmentstringRequired
idstring · uuidRequired

The channel id

Example: 2c1fc20d-59b4-4f67-8982-6e0377e8fdbd
Responses
204Success

No content

delete
/api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id}
DELETE /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: 
Accept: */*

No content

patch

Patch an alert channel

Path parameters
environmentstringRequired
idstring · uuidRequired

The channel id

Example: 2c1fc20d-59b4-4f67-8982-6e0377e8fdbd
Body
namestringOptional
connectionNamestringOptional
enabledbooleanOptional
propertiesObjectobjectOptional

JSON Schema representation of the configuration properties

Responses
200Success

No content

patch
/api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id}
PATCH /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "name": "kafka-prd-health",
  "connectionName": "slack-connection",
  "enabled": true,
  "properties": [
    {
      "key": "channel",
      "value": "#my-kafka-health-prd"
    }
  ]
}

No content

get

List channel templates and their applicable connections

Path parameters
environmentstringRequired
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/alert/channel-templates
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channel-templates HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": 439,
    "name": "Slack",
    "templateVersion": 1,
    "version": "1",
    "enabled": true,
    "builtIn": true,
    "metadata": {
      "author": "Lenses",
      "description": "Slack channel template"
    },
    "configuration": [
      {
        "id": 102,
        "key": "channel",
        "displayName": "Channel Name",
        "description": "The slack channel where alerts should be notified to",
        "type": {
          "name": "STRING",
          "displayName": "string"
        },
        "required": true,
        "provided": false
      }
    ],
    "suitableConnections": [
      {
        "templateName": "Slack",
        "name": "slack-connection"
      }
    ],
    "jsonSchema": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "required": [
        "username",
        "channel",
        "className",
        "webhook-url"
      ],
      "title": "Slack, version: 1 template JSON schema",
      "properties": {
        "channel": {
          "type": "string",
          "title": "Slack channel",
          "description": "The Slack channel send alerts to."
        },
        "icon-url": {
          "type": "string",
          "title": "Icon URL",
          "description": "The full path to an image to set for the slack message."
        },
        "username": {
          "type": "string",
          "title": "Slack username",
          "description": "The user name to appear in slack as the sender."
        },
        "webhook-url": {
          "type": "string",
          "title": "Webhook URL",
          "description": "The Slack endpoint to send alerts to."
        },
        "className": {
          "type": "string",
          "title": "Plugin class name",
          "description": "Fully qualified class name of plugin implementation."
        }
      }
    }
  }
]

Last updated

Was this helpful?