URL
POST https://{api-url}/api/v2/tenants/{tenantId}/alert
URL example
https://{api-url}/api/v2/tenants/client_93/alert
Note
- A list of event IDs is generated when alerts are created. This list is valid for 30 days.
- Use the event IDs to search and retrieve alert details.
Parameters
Parameters are required unless specified otherwise.
Field | Data Type | Description |
---|---|---|
subject | String | Summary content of the generated alert. Content includes metrics that lead to the alert. |
alertTime | String | (Optional) Time when the alert was triggered. |
currentState | String | Current state of alert. For example: OK, warning, critical, or info. |
serviceName | String | Service name. |
app | String | Alert management applications. Use the Get Alert Technologies API to view supported alert management technologies. |
component | String | (Optional) Device component. |
alertType | String | (Optional) Alert types. Use Get Alert Types API to fetch the list of alert types. Supported alert types are: monitoring, maintenance, appliance, agent, obsolete, scheduled maintenance. |
resourceName | String | (Optional) Resource name. |
description | String | (Optional) Brief description of the entities that led to the alert generation. Note: You can find the origin of the alert and identify crossed types of threshold of the applied metrics. Primarily, details may include metric, monitor description, device type, template name, group, site, service level, and component./td> |
monitorName | String | (Optional) Monitor name. |
ackUrl | String | (Optional) Acknowledge URL. |
rtype | String | (Optional) Resource type. |
extAlertId | String | (Optional) External alert ID. |
availability | Boolean | (Optional) Values: True/False. If set to true, creates availability alerts. |
device | Object | Create alerts on a device. At least one field is required in order to identify the device:
|
resource | Object | Create alerts on a resource. At least one field is required in order to identify the device:
|
Status code
200 OK
Sample request 1
{
"serviceName" : "CPU",
"device" : {
"hostName" : "Think-pad",
"resourceUUID" : "DEV0000011767",
"providerUUID" : "11767",
"systemUUID" : "11767",
"macAddress" : "2E:8B:EB:32:7A:F9",
"ipAddress" : "172.2.229.109"
},
"subject" : "Test API Alert for car",
"alertTime" : "2017-10-01T00:00:00+0000",
"currentState" : "CRITICAL",
"app" : "OPSRAMP",
"alertType" : "Maintenance",
"component" : "C",
"description" : "api calls",
"monitorName" : "test"
}
Sample response 1
{
[ "c1461bc2-eed5-4559-9d78-6ca6f35be8c5" ]
}
Sample request 2
{
"serviceName":"MEMORY",
"resource":{
"id":"5b850347-8798-45aa-9332-c7ff3dd1c60e"
},
"subject":"The Physical Memory Usage on the device is 56%.The Virtual Memory Usage on the device is 43%.",
"alertTime":"2018-11-02 10:52:55",
"currentState":"CRITICAL",
"alertType":"Monitoring",
"app":"OPSRAMP",
"component":"MEMORY",
"description":"Api calls "
}
Sample response 2
[ "3885d3fc-4e92-4a9d-871a-a5940cf7079b" ]
Sample request 3
{
"serviceName":"MEMORY",
"resource":{
"extResourceId": "646438712529389643",
"ipAddress":"172.24.132.47"
},
"subject":"The Physical Memory Usage on the device is 56%.The Virtual Memory Usage on the device is 43%.",
"alertTime":"2018-11-02 10:52:55",
"currentState":"CRITICAL",
"alertType":"Monitoring",
"app":"OPSRAMP",
"component":"MEMORY",
"description":"Api calls ",
"masterAgentUUID":"5b850347-8798-45aa-9332-c7ff3dd1c60e"
}
Sample response 3
[ "fa3245ca-6740-4f7a-bf06-02414c51595e" ]
Sample request 4
To create a resource and its attributes with an alert:
{
"serviceName": "CPU",
"resource": {
"hostName": "Think-pad",
"resourceType": "server",
"tags": [
{ "environment": "QA" },
{ "department": "R&D" }],
"deviceGroups": [
{ "name": "dg1" },
{ "name": "dg2" }],
"serviceGroups": [
{ "name": "sg1" },
{ "name": "sg2",
"parent": { "id": "SGP-a794d1de-e361-45ef-9d6e-4a450491bf35" }
}],
"location":
{ "name": "San Jose" }
},
"subject": "Performance Degradation on Windows Servers",
"alertTime": "2019-07-12T00:00:00+0000",
"currentState": "CRITICAL"
}
Sample response 4
[ "62b5d1c7-5e17-4027-9d9e-a8d566590468" ]
Notes
Creation of a new resource depends on the following:
- A new resource is created and new device group, service group, and location are assigned.
- A new resource is created and existing device group, service group, and location are assigned.
- An already existing resource cannot be assigned to a new or existing Device Group, Service Group and Location.
The response depends on the returned status code.