Alerts
Returns alert events divided into pages. Allows to specify page number and page size.
The bearer token can be obtained by creating a ServiceAccount.
The page number to be returned, must be greater than zero. Defaults to 1.
1The elements amount on a single page, must be greater than zero.
25Allows to filter results by partial summary text
active controllersAllows to filter results by category. Accepted values are: 'Infrastructure', 'Consumers', 'Kafka Connect', 'Topics' )
InfrastructureAllows to filter results by level
INFOAllows to filter results by alert id
1000The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v1/alert/events?pageSize=1 HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
}The bearer token can be obtained by creating a ServiceAccount.
5000Possible values: The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}
}The bearer token can be obtained by creating a ServiceAccount.
The Alert ID to enable
2000Possible values: The condition unique identifier
8ce90f4a-514b-45fc-a12e-268bc69525f5JSON Schema representation of the configuration properties
No content
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
PUT /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"condition": {},
"channels": [
"text"
]
}No content
The bearer token can be obtained by creating a ServiceAccount.
The Alert ID to enable
2000Possible values: The condition unique identifier
8ce90f4a-514b-45fc-a12e-268bc69525f5No content
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
DELETE /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The bearer token can be obtained by creating a ServiceAccount.
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v2/alert/settings HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}
]
}
}update of a fixed alert setting
The bearer token can be obtained by creating a ServiceAccount.
The Alert ID to enable
1000Possible values: JSON Schema representation of the configuration properties
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
PUT /api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}partial update of a fixed alert setting
The bearer token can be obtained by creating a ServiceAccount.
The Alert ID to enable
1000Possible values: JSON Schema representation of the configuration properties
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
PATCH /api/v1/environments/{environment}/proxy/api/v2/alert/settings/{alert_setting_id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}The bearer token can be obtained by creating a ServiceAccount.
The Alert ID to enable
2000Possible values: JSON Schema representation of the configuration properties
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
POST /api/v1/environments/{environment}/proxy/api/v1/alert/settings/{alert_setting_id}/conditions HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}Lists alert channels ordered by their creation time (most recent first)
The bearer token can be obtained by creating a ServiceAccount.
The page number to be returned, must be greater than zero. Defaults to 1.
1The elements amount on a single page, must be greater than zero.
25Filter by channel template name
Matches channels by name
The field to sort results by
Sorting order. Defaults to ascending
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channels?pageSize=1 HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
}The JSON object representing the properties to set this channel with
The bearer token can be obtained by creating a ServiceAccount.
JSON Schema representation of the configuration properties
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
The supplied identifier is already being used by another resource
An internal server error has occurred
POST /api/v1/environments/{environment}/proxy/api/v1/alert/channels HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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 the alert channel details
The bearer token can be obtained by creating a ServiceAccount.
The channel id
2c1fc20d-59b4-4f67-8982-6e0377e8fdbdThe request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}Update alert channel
The bearer token can be obtained by creating a ServiceAccount.
The channel id
2c1fc20d-59b4-4f67-8982-6e0377e8fdbdJSON Schema representation of the configuration properties
No content
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
The supplied identifier is already being used by another resource
An internal server error has occurred
PUT /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
Permanently delete a channel
The bearer token can be obtained by creating a ServiceAccount.
The channel id
2c1fc20d-59b4-4f67-8982-6e0377e8fdbdThe request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
DELETE /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Patch an alert channel
The bearer token can be obtained by creating a ServiceAccount.
The channel id
2c1fc20d-59b4-4f67-8982-6e0377e8fdbdJSON Schema representation of the configuration properties
No content
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
The supplied identifier is already being used by another resource
An internal server error has occurred
PATCH /api/v1/environments/{environment}/proxy/api/v1/alert/channels/{id} HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
List channel templates and their applicable connections
The bearer token can be obtained by creating a ServiceAccount.
The request input was invalid
Authentication error
The purchased Lenses license does not provide access to this feature
Authorisation error
The requested resource cannot be found
An internal server error has occurred
GET /api/v1/environments/{environment}/proxy/api/v1/alert/channel-templates HTTP/1.1
Host: api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
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?

