Skip to content

Create Alert / Create Load Balancer Alert / Create a Cluster Alert

POST
/api/v1/monitoring/single-service/alerts/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"trigger_data": {
"trigger_type": "load",
"trigger_operator": ">",
"trigger_threshold": 10,
"owner": 12345,
"usergroups": [
1234
],
"trigger_severity": 4,
"service_type": "nodes",
"service_ids": [
12345
]
}
}'

Creates a monitoring alert (trigger) for one or more load balancers. The request body must be wrapped in a top-level trigger_data object - a missing trigger_data key returns 400 trigger_data key is required.

For load balancers, set service_type to load_balancer and list the load balancer IDs in service_ids. The alert fires when the chosen metric (trigger_type) crosses trigger_threshold according to trigger_operator. Notifications are sent to the user groups in usergroups, owned by the IAM member in owner.

Creates a monitoring alert for a cluster node. The alert fires when a metric (trigger_type) crosses trigger_threshold per trigger_operator, and notifies the chosen user groups. The alert configuration is wrapped in a trigger_data object with service_type: "kubernetes" and the target node service_ids.

Create Alert, Create Load Balancer Alert and Create a Cluster Alert share this request; the body you send decides which one runs.

project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used for authenticating the request

Example

<API_KEY>
location
required
string

Specifies the location for which the alert is created

Example

<LOCATION>
Media typeapplication/json
One of:
object
trigger_data
object
trigger_type

Specifies the type of trigger that activates the alert

string

Example

load
trigger_operator

Comparison operator used to evaluate the trigger condition

string

Example

>
trigger_threshold

Threshold value that triggers the alert

integer

Example

10
owner

ID of the user who owns the alert

integer

Example

12345
usergroups
Array<integer>
trigger_severity

Severity level of the trigger

integer

Example

4
service_type

Specifies the type of service that triggered the alert

string

Example

nodes
service_ids
Array<integer>

Successful response

Media typeapplication/json
object
code

HTTP status code indicating the result of the create alert request

integer
data
object
id

Unique identifier of the created alert

integer
trigger_type

The type of condition that triggers the alert

string
operator

Comparison operator used in the alert condition

string
threshold

The numeric threshold value for the created alert.

integer
service_type

Type of service the alert applies to

string
is_alert_enabled

Indicates whether the created alert is enabled

boolean
notified_groups
Array<object>
object
id

Unique identifier of the notified group

integer
name

Name of the notified group

string
zabbix_user_group_id

Identifier of the Zabbix user group associated with the notification

integer
member
Array<object>
object
id

Unique identifier of the group member

integer
iam_user
object
member_id

Unique identifier of the IAM user

integer
name

Name of the IAM user associated with the notified group member.

string
email

IAM user’s email address

string format: email
role

IAM role assigned to the member within the notified group

string
iam_type

IAM role type of the user

string
invitation_status

Status of the IAM user invitation

string
allowed_to_edit_by_current_user

Indicates if the current user can edit this IAM user

string
date_joined

Timestamp when the member joined, in ISO 8601 UTC format

string format: date-time
date_removed

Date the member was removed from the notified group

string
resources
Array<object>
object
id

Unique identifier of the created alert

integer
name

Name of the created alert resource

string
severity

Severity level of the created alert

integer
volume_id

Unique identifier of the volume related to the alert

string
errors
object
message

Status message indicating the result of the create alert operation

string

Example

{
"code": 201,
"data": {
"id": 123456,
"trigger_type": "load",
"operator": ">",
"threshold": 10,
"service_type": "nodes",
"is_alert_enabled": true,
"notified_groups": [
{
"id": 1234,
"name": "Default-26931-40057",
"zabbix_user_group_id": 123,
"member": [
{
"id": 1234,
"iam_user": {
"member_id": 12345,
"name": "Name",
"email": "example@gmail.com",
"role": "Admin",
"iam_type": "Owner",
"invitation_status": "Accepted"
},
"date_joined": "2025-02-19T06:38:52.965166Z"
}
]
}
],
"resources": [
{
"id": 12345,
"name": "C3-8GB-508"
}
],
"severity": 4
},
"message": "Created Successfully"
}

Alert configuration created successfully

Media typeapplication/json
object
code
integer
data
object
id
integer
trigger_type
string
operator
string
threshold
number format: float
service_type
string
notified_groups
Array<object>
object
id
integer
name
string
zabbix_user_group_id
integer
member
Array<object>
object
id
integer
iam_user
object
member_id
integer
name
string
email
string
role
string
iam_type
string
invitation_status
string
allowed_to_edit_by_current_user
string
date_joined
string format: date-time
date_removed
string format: date-time
resources
Array<string>
severity
integer
errors
object
key
additional properties
any
message
string

Example

{
"code": 201,
"data": {
"id": 45079,
"trigger_type": "qps",
"operator": "<",
"threshold": 90,
"service_type": "dbaas",
"notified_groups": [
{
"id": 5782,
"name": "Default-26322-38856",
"zabbix_user_group_id": 34277,
"member": [
{
"id": 6160,
"iam_user": {
"member_id": 45958,
"name": "Vishnukant Shukla",
"email": "vishnukant.shukla@e2enetworks.com",
"role": "Admin",
"iam_type": "Owner",
"invitation_status": "Accepted",
"allowed_to_edit_by_current_user": null
},
"date_joined": "2025-01-14T06:56:40.920958Z",
"date_removed": null
}
]
}
],
"resources": [
"E2E-DBaaS-26322-2920"
],
"severity": 4
},
"message": "Created Successfully"
}