EDB Postgres Enterprise Manager REST APIs v1.0: Alert template v10.2

get__alert_template_

Code samples

GET /alert/template/

Gets Alert templates.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "description": "string",
    "default_history_retention": 0,
    "object_type": 0,
    "sql": "string",
    "applicable_on_server": "ALL",
    "default_check_frequency": 0,
    "threshold_unit": "string",
    "is_system_template": true
  }
]

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[AlertTemplate]falsenonenone
» idintegerfalsenoneIdentifier for the alert template. NOTE: It is not applicable while creating the alert template.
» namestringfalsenoneName of the alert template. NOTE: It is a mandatory parameter for the POST request.
» descriptionstringfalsenoneDescription about the alert template. NOTE: It is a mandatory parameter for the POST request.
» default_history_retentionintegerfalsenoneDefines the history retention period in days for this type of alerts. NOTE: It is a mandatory parameter for the POST request.
» object_typeintegerfalsenoneDefines the type of the object on which this alert template is applicable to.
  • System wide alert template will be 50.
  • An alert template applicable to an agent will be 100.
  • An alert template applicable to a managed server will be 200.
  • An alert template applicable to a database for a particular monitored server will be 300.
  • An alert template applicable to a schema on a particular database for the managed server will be 400.
  • An alert template applicable to a table on a particular schema for the database on a monitored server will be 500.
  • An alert template applicable to an index on a particular schema for the database on a monitored server will be 600.
  • An alert template applicable to a sequence on a particular schema for the database on a monitored server will be 700.
  • An alert template applicable to a function on a particular schema for the database on a monitored server will be 800.
NOTE: It is a mandatory parameter for the POST request.
» sqlstringfalsenoneSQL query, possibly parameterized, to get a numeric indicating threshold reached. NOTE: It is a mandatory parameter for the POST request.
» applicable_on_serverstringfalsenoneTemplate is applicable on which type of monitored server. Possible values are ALL, POSTGRES_SERVER, ADVANCED_SERVER. NOTE: It is a mandatory parameter for the POST request.
» default_check_frequencyintegerfalsenoneDefines how frequently to check for the alert defined from this template (in minutes). NOTE: It is a mandatory parameter for the POST request.
» threshold_unitstringfalsenoneUnit in which threshold is calculated; purely for GUI, like MB/kB/seconds/days/...
» is_system_templatebooleanfalsenoneDefines whether the given template is system defined or user defined. NOTE: It is not applicable for the the POST/PUT requests.
Enumerated Values
PropertyValue
applicable_on_serverALL
applicable_on_serverPOSTGRES_SERVER
applicable_on_serverADVANCED_SERVER
Info

This operation does not require authentication

post__alert_template_

Code samples

POST /alert/template/

Create Alert template.

Body parameter

{
  "id": 0,
  "name": "string",
  "description": "string",
  "default_history_retention": 0,
  "object_type": 0,
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "threshold_unit": "string",
  "is_system_template": true
}

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyAlertTemplatetruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

get__alert_template_{id}

Code samples

GET /alert/template/{id}

Gets Alert tenplate idetified by the id.

Parameters

NameInTypeRequiredDescription
idpathintegertrueAlert Template ID
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "id": 0,
  "name": "string",
  "description": "string",
  "default_history_retention": 0,
  "object_type": 0,
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "threshold_unit": "string",
  "is_system_template": true
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseAlertTemplate
Info

This operation does not require authentication

put__alert_template_{id}

Code samples

PUT /alert/template/{id}

Update Alert template.

Body parameter

{
  "id": 0,
  "name": "string",
  "description": "string",
  "default_history_retention": 0,
  "object_type": 0,
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "threshold_unit": "string",
  "is_system_template": true
}

Parameters

NameInTypeRequiredDescription
idpathintegertrueAlert Template ID
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyAlertTemplatetruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

delete__alert_template_{id}

Code samples

DELETE /alert/template/{id}

Delete the Alert trmplate.

Parameters

NameInTypeRequiredDescription
idpathintegertrueAlert Template ID
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKSuccessful deletionNone

Response Schema

Info

This operation does not require authentication