Method
createMonitorAlert POST
Copy POST

Create a monitor alert for the given conditions and monitor. We can create monitor alert either for model monitor or real-time monitor.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes projectId str Unique string identifier for the project.
Yes alertName str Name of the alert.
Yes conditionConfig AlertConditionConfig Condition to run the actions for the alert.
KEY TYPE Description
alertType None None
Yes actionConfig AlertActionConfig Configuration for the action of the alert.
KEY TYPE Description
actionType None None
No modelMonitorId str Unique string identifier for the model monitor created under the project.
No realtimeMonitorId str Unique string identifier for the real-time monitor for the deployment created under the project.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
result MonitorAlert
KEY TYPE Description
name str The user-friendly name for the alert.
monitorAlertId str The unique identifier of the monitor alert.
createdAt str Date and time at which the monitor alert was created.
projectId str The project this alert belongs to.
modelMonitorId str The monitor id that this alert is associated with
realtimeMonitorId str The realtime monitor id that this alert is associated with
conditionConfig dict The condition configuration for this alert.
actionConfig dict The action configuration for this alert.
conditionDescription str User friendly description of the condition
actionDescription str User friendly description of the action
alertType str The type of the alert
deploymentId str The deployment ID this alert is associated with
latestMonitorAlertVersion MonitorAlertVersion The latest monitor alert version.
KEY TYPE Description
name str The user-friendly name for the monitor alert.
monitorAlertVersion str The identifier for the alert version.
monitorAlertId str The identifier for the alert.
status str The current status of the monitor alert.
createdAt str Date and time at which the monitor alert was created.
alertingStartedAt str The start time and date of the monitor alerting process.
alertingCompletedAt str The end time and date of the monitor alerting process.
error str Relevant error if the status is FAILED.
modelMonitorVersion str The model monitor version associated with the monitor alert version.
conditionConfig dict The condition configuration for this alert.
actionConfig dict The action configuration for this alert.
alertResult str The current result of the alert
actionStatus str The current status of the action as a result of the monitor alert.
actionError str Relevant error if the action status is FAILED.
actionStartedAt str The start time and date of the actionfor the alerting process.
actionCompletedAt str The end time and date of the actionfor the alerting process.
conditionDescription str User friendly description of the condition
actionDescription str User friendly description of the action
alertType str The type of the alert

Exceptions:

TYPE WHEN
DataNotFoundError

projectId is not found.

DataNotFoundError

modelMonitorId is not found.

DataNotFoundError

realtimeMonitorId is not found.

Language: