Create alerts on resources

This endpoint is used to generate multiple alerts on resources.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{clientId}/alerts

Sample URLs

https://{api-url}/api/v2/tenants/client_93/alerts

Parameters

FieldData TypeDescription
subjectStringAlert subject.
descriptionString(Optional) Alert description.
alertTimeStringTime to trigger the alert.
currentStateStringCurrent state of alert.
serviceNameStringService name.
appStringAlert management applications. Use the Get Alert Technologies API that OpsRamp supports.
componentString(Optional) Device component.
alertTypeString(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.
resourceNameString(Optional) Resource name.
monitorNameString(Optional) Monitor name.
ackUrlString(Optional) Acknowledge URL.
rtypeString(Optional) Resource type.
extAlertIdString(Optional) External alert ID.
deviceObjectCreate alerts on a device.
  • resourceUUID
  • hostName
  • macAddress
  • ipAddress
  • providerUUID
  • systemUUID
resourceObjectCreate alerts on a resource.
  • id: The resource unique ID. Use the Search Resources API to retrieve list of resources.
  • extResourceId: External ID of resource.
  • ipAddress: Resource IP address.
  • hostName: The host name.

Provide either device or resource object.

Sample request

[
	{
		"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 1 for car",
		"alertTime" : "2017-10-01T00:00:00+0000",
		"currentState" : "CRITICAL",
		"app" : "OPSRAMP",
		"alertType" : "Maintenance",
		"component" : "C",
		"description" : "api call test",
		"monitorName" : "test"
	},
	{
		"serviceName" : "CPU",
		"device" : {
			"hostName" : "Think-pad-i5",
			"resourceUUID" : "DEV0000011768",
			"providerUUID" : "11768",
			"systemUUID" : "11768",
			"macAddress" : "3B:5E:EB:52:3E:B5",
			"ipAddress" : "172.2.228.110"
		},
		"subject" : "Test API Alert 2 for car",
		"alertTime" : "2017-10-02T00:00:00+0000",
		"currentState" : "CRITICAL",
		"app" : "OPSRAMP",
		"alertType" : "Maintenance",
		"component" : "C",
		"description" : "api call test",
		"monitorName" : "test"
	},
	{
		"serviceName" : "MEMORY",
		"resource":{
			"id":"5b850347-8798-45aa-9332-c7ff3dd1c60e"
		},
		"subject" : "Test API Alert 1 for car",
		"alertTime" : "2017-10-01T00:00:00+0000",
		"currentState" : "CRITICAL",
		"app" : "OPSRAMP",
		"alertType" : "Maintenance",
		"component" : "C",
		"description" : "api call test",
		"monitorName" : "test"
	},
	{
		"serviceName":"MEMORY",
		"resource":{
			"extResourceId": "646438712529389643",
			"ipAddress":"172.24.132.47"
		},
		"subject":"The Physical Memory Usage on the device is 56%",
		"alertTime":"2018-11-02 10:52:55",
		"currentState":"CRITICAL",
		"alertType":"Monitoring",
		"app":"OPSRAMP",
		"component":"MEMORY",
		"oldState":"OK",
		"description":"Api calls ",
		"masterAgentUUID":"5b850347-8798-45aa-9332-c7ff3dd1c60e"
	}
]

Sample response

Null