[{"label":"Latest (v1)","version":"latest"}]
vmware-aria-operations-for-logs

Create Alert

Description

You can create an alert to notify users when specific data appears in the logs. An alert is based on a query.

Request

Request

URL

URL


post
https://{api_host}/vrlic/api/v1/alert
Copy

Request Body

Request Body

AlertDefinitionDto of mimetype application/json Required
{
	"alertType": "per-event/windowed",
	"name": "string",
	"operator": "GREATER_THAN",
	"periodInMillis": 0,
	"query": {
		"constraints": {
			"constraints": "QueryConstraint Object",
			"operator": "AND"
		},
		"name": "string"
	},
	"severityThreshold": {
		"key": 0
	}
}
string
name Required

Alert name


string
alertType Required

Type of alert

Possible values are: per-event/windowed


map of number as double
severityThreshold Required

Map of severity(CRITICAL, IMMEDIATE, WARNING, INFO) and threshold value


query Required

Query definition


integer as int64
periodInMillis Required

Time period that indicates how frequently the alert should be evaluated (in milliseconds)


string
operator Required

Condition for triggering the alert

Possible values are: GREATER_THANGREATER_THAN_EQUALLESS_THANLESS_THAN_EQUALEQUAL


map of string
alertMetadata Optional

Additional information associated with the alert


entityTagAssociation Optional

List of tags associated with this alert


string
id Optional

Alert ID


logRcaConfig Optional

Lists the RCA parameters if Root Cause Analysis (RCA) is enabled, otherwise it’s null


boolean
enabled Optional

Indicates whether the alert is enabled or disabled


array of string
notificationConfigs Optional

Notification configs associated with the alert


notificationMetadata Optional

Custom fields or all logs corresponding to the alert included in the alert notification


array of string
emailRecipients Optional

Email recipients for the alert notifications


string
description Optional

Alert description


string
cspOrgId Optional

Unique ID associated with the org


string
recommendations Optional

Alert recommendations for troubleshooting


string
contentPackId Optional

ID of the content pack that the alert belongs to if the alert is part of a content pack


severityToNotificants Optional

Map of severity(CRITICAL, IMMEDIATE, WARNING, INFO) to the list of notification recipients (email and webhook)


integer as int64
snoozeEndTimeInMillis Optional

End time for snoozing the alert (in milliseconds)


integer as int64
snoozeStartTimeInMillis Optional

Start time for snoozing the alert (in milliseconds)


string
source Optional

Source of the alert

Possible values are: USER_DEFINED


number as double
threshold Optional

Minimum threshold for triggering the alert

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

201 Created

Returns AlertDefinitionDto of type */*
{
	"alertMetadata": {
		"key": "string"
	},
	"alertType": "per-event/windowed",
	"contentPackId": "string",
	"cspOrgId": "string",
	"description": "string",
	"emailRecipients": [
		"string"
	],
	"enabled": false,
	"entityTagAssociation": [
		{
			"tagId": "string",
			"tagName": "string"
		}
	],
	"id": "string",
	"logRcaConfig": {
		"autoRcaEnabled": false,
		"id": "string",
		"mergeThreshold": 0,
		"minFilterThreshold": 0,
		"rankThreshold": 0,
		"timeWindowMin": 0
	},
	"name": "string",
	"notificationConfigs": [
		"string"
	],
	"notificationMetadata": {
		"customFields": [
			"string"
		],
		"isIncludeAllLogs": false,
		"outputFormat": "TABLE"
	},
	"operator": "GREATER_THAN",
	"periodInMillis": 0,
	"query": {
		"aggregationFunctions": [
			{
				"fieldName": "string",
				"functionName": "COUNT"
			}
		],
		"constraints": {
			"constraints": "QueryConstraint Object",
			"fieldName": "string",
			"operator": "AND",
			"tags": [
				"string"
			],
			"value": "string"
		},
		"contentPackId": "string",
		"description": "string",
		"groupByTerms": [
			{
				"fieldName": "string",
				"groupByType": "EACH_VALUE"
			}
		],
		"name": "string",
		"queryId": "string",
		"relationFunctions": [
			{
				"relationName": "string",
				"relationType": "LOGS",
				"shardInfo": {
					"key": "string"
				}
			}
		],
		"source": "USER_DEFINED"
	},
	"recommendations": "string",
	"severityThreshold": {
		"key": 0
	},
	"severityToNotificants": {
		"key": {
			"emailRecipients": [
				"string"
			],
			"notificationConfigs": [
				"string"
			],
			"sendToVrops": false
		}
	},
	"snoozeEndTimeInMillis": 0,
	"snoozeStartTimeInMillis": 0,
	"source": "USER_DEFINED",
	"threshold": 0
}
string
name Required

Alert name


string
alertType Required

Type of alert

Possible values are: per-event/windowed


map of number as double
severityThreshold Required

Map of severity(CRITICAL, IMMEDIATE, WARNING, INFO) and threshold value


query Required

Query definition


integer as int64
periodInMillis Required

Time period that indicates how frequently the alert should be evaluated (in milliseconds)


string
operator Required

Condition for triggering the alert

Possible values are: GREATER_THANGREATER_THAN_EQUALLESS_THANLESS_THAN_EQUALEQUAL


map of string
alertMetadata Optional

Additional information associated with the alert


entityTagAssociation Optional

List of tags associated with this alert


string
id Optional

Alert ID


logRcaConfig Optional

Lists the RCA parameters if Root Cause Analysis (RCA) is enabled, otherwise it’s null


boolean
enabled Optional

Indicates whether the alert is enabled or disabled


array of string
notificationConfigs Optional

Notification configs associated with the alert


notificationMetadata Optional

Custom fields or all logs corresponding to the alert included in the alert notification


array of string
emailRecipients Optional

Email recipients for the alert notifications


string
description Optional

Alert description


string
cspOrgId Optional

Unique ID associated with the org


string
recommendations Optional

Alert recommendations for troubleshooting


string
contentPackId Optional

ID of the content pack that the alert belongs to if the alert is part of a content pack


severityToNotificants Optional

Map of severity(CRITICAL, IMMEDIATE, WARNING, INFO) to the list of notification recipients (email and webhook)


integer as int64
snoozeEndTimeInMillis Optional

End time for snoozing the alert (in milliseconds)


integer as int64
snoozeStartTimeInMillis Optional

Start time for snoozing the alert (in milliseconds)


string
source Optional

Source of the alert

Possible values are: USER_DEFINED


number as double
threshold Optional

Minimum threshold for triggering the alert

No error details were provided in the OpenAPI specification.

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"alertMetadata":{"key":"string"},"alertType":"per-event/windowed","contentPackId":"string","cspOrgId":"string","description":"string","emailRecipients":["string"],"enabled":false,"entityTagAssociation":[{"tagId":"string","tagName":"string"}],"id":"string","logRcaConfig":{"autoRcaEnabled":false,"id":"string","mergeThreshold":0,"minFilterThreshold":0,"rankThreshold":0,"timeWindowMin":0},"name":"string","notificationConfigs":["string"],"notificationMetadata":{"customFields":["string"],"isIncludeAllLogs":false,"outputFormat":"TABLE"},"operator":"GREATER_THAN","periodInMillis":0,"query":{"aggregationFunctions":[{"fieldName":"string","functionName":"COUNT"}],"constraints":{"constraints":"QueryConstraint Object","fieldName":"string","operator":"AND","tags":["string"],"value":"string"},"contentPackId":"string","description":"string","groupByTerms":[{"fieldName":"string","groupByType":"EACH_VALUE"}],"name":"string","queryId":"string","relationFunctions":[{"relationName":"string","relationType":"LOGS","shardInfo":{"key":"string"}}],"source":"USER_DEFINED"},"recommendations":"string","severityThreshold":{"key":0},"severityToNotificants":{"key":{"emailRecipients":["string"],"notificationConfigs":["string"],"sendToVrops":false}},"snoozeEndTimeInMillis":0,"snoozeStartTimeInMillis":0,"source":"USER_DEFINED","threshold":0}' https://{api_host}/vrlic/api/v1/alert


[{"label":"Latest (v1)","version":"latest"}]
vmware-aria-operations-for-logs
Feedback

Was this page helpful?