Create Alert / Create Load Balancer Alert / Create a Cluster Alert
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 ] }}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "trigger_data": { "trigger_type": "load", "trigger_operator": ">", "trigger_threshold": 10, "owner": 12345, "usergroups": [ 1234, ], "trigger_severity": 4, "service_type": "nodes", "service_ids": [ 12345, ], }, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "trigger_data": { "trigger_type": "load", "trigger_operator": ">", "trigger_threshold": 10, "owner": 12345, "usergroups": [ 1234 ], "trigger_severity": 4, "service_type": "nodes", "service_ids": [ 12345 ] } }),});console.log(await response.json());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, "trigger_severity": 4, "service_type": "load_balancer", "service_ids": [ 1234 ], "owner": 12345, "usergroups": [ 1234 ] }}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "trigger_data": { "trigger_type": "load", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "load_balancer", "service_ids": [ 1234, ], "owner": 12345, "usergroups": [ 1234, ], }, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "trigger_data": { "trigger_type": "load", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "load_balancer", "service_ids": [ 1234 ], "owner": 12345, "usergroups": [ 1234 ] } }),});console.log(await response.json());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": "disk", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "kubernetes", "service_ids": [ 320000 ], "owner": 1234, "usergroups": [ 1234 ], "volume": { "id": 0, "volume_name": "Node Volume" } }}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "trigger_data": { "trigger_type": "disk", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "kubernetes", "service_ids": [ 320000, ], "owner": 1234, "usergroups": [ 1234, ], "volume": { "id": 0, "volume_name": "Node Volume", }, }, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/monitoring/single-service/alerts/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "trigger_data": { "trigger_type": "disk", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "kubernetes", "service_ids": [ 320000 ], "owner": 1234, "usergroups": [ 1234 ], "volume": { "id": 0, "volume_name": "Node Volume" } } }),});console.log(await response.json());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.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>API key used for authenticating the request
Example
<API_KEY>Specifies the location for which the alert is created
Example
<LOCATION>Request Body
Section titled “Request Body”object
object
Specifies the type of trigger that activates the alert
Example
loadComparison operator used to evaluate the trigger condition
Example
>Threshold value that triggers the alert
Example
10ID of the user who owns the alert
Example
12345Severity level of the trigger
Example
4Specifies the type of service that triggered the alert
Example
nodesobject
Wrapper object holding the alert definition. Required - a missing trigger_data key returns a 400 error.
object
Metric the alert watches. For load balancers the console offers load (processor load), memory (consumed memory), and disk (free disk space).
Example
loadComparison used between the metric and trigger_threshold.
Example
>Threshold value that triggers the alert.
Example
10Severity level of the alert. 0 = Not classified, 1 = Information, 2 = Warning, 3 = Average, 4 = High, 5 = Disaster.
Example
4Resource type the alert applies to. Use load_balancer for load balancers.
Example
load_balancerIDs of the load balancers the alert is attached to.
IAM member ID that owns the alert (the account owner’s member_id).
Example
12345IDs of the user groups notified when the alert fires.
The alert definition is wrapped in a trigger_data object.
object
object
The metric the alert watches.
Example
diskComparison operator applied to the metric.
Example
>Threshold the metric is compared against.
Example
10Severity level of the alert.
Example
4The service kind the alert is for.
Example
kubernetesThe target node id(s) to attach the alert to.
Example
[ 320000]IAM user ID that owns the alert.
Example
1234User group IDs to notify when the alert fires.
Example
[ 1234]Volume target - required for volume.read / volume.write alerts.
object
Example
0Example
Node VolumeExample
{ "trigger_data": { "trigger_type": "disk", "trigger_operator": ">", "trigger_threshold": 10, "trigger_severity": 4, "service_type": "kubernetes", "service_ids": [ 320000 ], "owner": 1234, "usergroups": [ 1234 ], "volume": { "id": 0, "volume_name": "Node Volume" } }}object
object
Example
qpsExample
<Example
90Example
45958Example
[ 5782]Example
4Example
dbaasExample
[ 5276]Responses
Section titled “Responses”Successful response
object
HTTP status code indicating the result of the create alert request
object
Unique identifier of the created alert
The type of condition that triggers the alert
Comparison operator used in the alert condition
The numeric threshold value for the created alert.
Type of service the alert applies to
Indicates whether the created alert is enabled
object
Unique identifier of the notified group
Name of the notified group
Identifier of the Zabbix user group associated with the notification
object
Unique identifier of the group member
object
Unique identifier of the IAM user
Name of the IAM user associated with the notified group member.
IAM user’s email address
IAM role assigned to the member within the notified group
IAM role type of the user
Status of the IAM user invitation
Indicates if the current user can edit this IAM user
Timestamp when the member joined, in ISO 8601 UTC format
Date the member was removed from the notified group
object
Unique identifier of the created alert
Name of the created alert resource
Severity level of the created alert
Unique identifier of the volume related to the alert
object
Status message indicating the result of the create alert operation
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
object
object
object
object
object
object
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"}