PingPlotter Cloud Manual
Alert Groups
Overview
Alert groups are actions shared by several Alerts, in tiers that run as more of their Targets fail. They're the API version of linked Groups & Tiers.
An Alert action with Targets or RepeatEverySeconds set is a group that belongs to that Alert alone. Those are managed with the Alerts API and aren't listed here.
API keys need the Alerts Read permission to read and the Alerts Write permission to make changes. See API Key Permissions.
GET
GET /alert-groups
GET /alert-groups
Retrieve all alert groups.
curl -X 'GET' \ 'https://yoursubdomain.api.pingplotter.cloud/alert-groups' \ -H 'accept: application/json' \ -H 'X-API-KEY: your_api_token'
200 Response
[
{
"AlertGroupId": "string",
"Name": "string",
"Tiers": 0,
"AlertCount": 0
}
]
GET /alert-groups/status
GET /alert-groups/status
Retrieve every alert group's status (Healthy or Triggered) and how many Targets are triggering its Alerts.
curl -X 'GET' \ 'https://yoursubdomain.api.pingplotter.cloud/alert-groups/status' \ -H 'accept: application/json' \ -H 'X-API-KEY: your_api_token'
200 Response
[
{
"AlertGroupId": "string",
"Name": "string",
"Status": "Healthy",
"TriggeredTargetCount": 0
}
]
GET /alert-groups/{alertGroupId}
GET /alert-groups/{alertGroupId}
Retrieve an alert group's tiers, highest first, and the Alerts that belong to it.
curl -X 'GET' \
'https://yoursubdomain.api.pingplotter.cloud/alert-groups/{alertGroupId}' \
-H 'accept: application/json' \
-H 'X-API-KEY: your_api_token'
200 Response
{
"AlertGroupId": "string",
"Name": "string",
"Actions": [
{
"Type": "Email",
"To": "noc@example.com",
"Targets": 1,
"RepeatEverySeconds": 3600
}
],
"Alerts": [
{
"AlertId": "string",
"Name": "string"
}
]
}
GET /alert-groups/{alertGroupId}/status
GET /alert-groups/{alertGroupId}/status
Retrieve one alert group's status and the Targets triggering it, with the Alert each one triggered.
curl -X 'GET' \
'https://yoursubdomain.api.pingplotter.cloud/alert-groups/{alertGroupId}/status' \
-H 'accept: application/json' \
-H 'X-API-KEY: your_api_token'
200 Response
{
"AlertGroupId": "string",
"Name": "string",
"Status": "Triggered",
"TriggeredTargetCount": 0,
"TriggeredTargets": [
{
"SessionId": "string",
"TargetName": "string",
"AgentUniqueId": "string",
"AgentName": "string",
"AlertId": "string",
"Offline": false
}
]
}
POST
POST /alert-groups
POST /alert-groups
Create an alert group. Each action is a tier that runs when Targets or more of the group's Targets are failing. Higher tiers quiet the reminders of lower ones.
curl -X 'POST' \
'https://yoursubdomain.api.pingplotter.cloud/alert-groups' \
-H 'accept: application/json' \
-H 'X-API-KEY: your_api_token' \
-H 'Content-Type: application/json' \
-d '{
"Name": "NOC escalation",
"Actions": [
{
"Type": "Email",
"To": "noc@example.com",
"Targets": 1,
"RepeatEverySeconds": 3600
},
{
"Type": "Email",
"To": "manager@example.com",
"Targets": 5,
"DelaySeconds": 600
},
{
"Type": "Rest",
"Url": "https://hooks.example.com/escalate",
"Method": "POST",
"DataType": "Json",
"RequestBody": "{\"text\":\"10 or more targets are down\"}",
"Targets": 10
}
],
"AlertIds": [
"string",
"string"
]
}'
200 Response
{
"AlertGroupId": "string",
"Name": "string",
"Actions": [
{
"Type": "Email",
"To": "noc@example.com",
"Targets": 1,
"RepeatEverySeconds": 3600
}
],
"Alerts": [
{
"AlertId": "string",
"Name": "string"
}
]
}
Request Body
| Key | Type | Notes |
|---|---|---|
| Name | string | Required. Up to 100 characters. |
| Actions | object array | Required. 1 to 10 actions, in the same shape as Alert actions. Targets defaults to 1. Actions with the same Targets value are in the same tier. |
| AlertIds | string array | Alerts to add to the group. |
PUT
PUT /alert-groups/{alertGroupId}
PUT /alert-groups/{alertGroupId}
Rename an alert group, replace its tiers, or add and remove Alerts. Tier changes apply to every Alert in the group. Removing the last Alert deletes the group.
curl -X 'PUT' \
'https://yoursubdomain.api.pingplotter.cloud/alert-groups/{alertGroupId}' \
-H 'accept: application/json' \
-H 'X-API-KEY: your_api_token' \
-H 'Content-Type: application/json' \
-d '{
"AddAlertIds": [
"string"
],
"RemoveAlertIds": [
"string"
]
}'
200 Response
{
"AlertGroupId": "string",
"Name": "string",
"Actions": [
{
"Type": "Email",
"To": "noc@example.com",
"Targets": 1,
"RepeatEverySeconds": 3600
}
],
"Alerts": [
{
"AlertId": "string",
"Name": "string"
}
]
}
Send at least one of these. If the group was deleted, the response has "Deleted": true and a Note explaining why.
Request Body
| Key | Type | Notes |
|---|---|---|
| Name | string | New name. |
| Actions | object array | Replaces all of the group's tiers. |
| AddAlertIds | string array | Alerts to add. |
| RemoveAlertIds | string array | Alerts to remove. |
DELETE
DELETE /alert-groups/{alertGroupId}
DELETE /alert-groups/{alertGroupId}
Delete an alert group. Its Alerts stop using it.
curl -X 'DELETE' \
'https://yoursubdomain.api.pingplotter.cloud/alert-groups/{alertGroupId}' \
-H 'accept: application/json' \
-H 'X-API-KEY: your_api_token'
200 Response
{
"AlertGroupId": "string",
"Name": "string",
"Deleted": true
}