abacusai.monitor_alert — AbacusAI documentation

# abacusai.monitor_alert

## Classes

`MonitorAlert` | A Monitor Alert

## Module Contents

class abacusai.monitor_alert.MonitorAlert(client, name=None, monitorAlertId=None, createdAt=None, projectId=None, modelMonitorId=None, realtimeMonitorId=None, conditionConfig=None, actionConfig=None, conditionDescription=None, actionDescription=None, alertType=None, deploymentId=None, latestMonitorAlertVersion={})

  Bases: `abacusai.return_class.AbstractApiClass`

  A Monitor Alert

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - 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.

  name
  monitor_alert_id
  created_at
  project_id
  model_monitor_id
  realtime_monitor_id
  condition_config
  action_config
  condition_description
  action_description
  alert_type
  deployment_id
  latest_monitor_alert_version
  deprecated_keys
  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  update(alert_name=None, condition_config=None, action_config=None)

    Update monitor alert

    Parameters:

      - alert_name (str) – Name of the alert.

      - condition_config (AlertConditionConfig) – Condition to run the actions for the alert.

      - action_config (AlertActionConfig) – Configuration for the action of the alert.

    Returns:

      Object describing the monitor alert.

    Return type:

      MonitorAlert

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      MonitorAlert

  describe()

    Describes a given monitor alert id

    Parameters:

      monitor_alert_id (str) – Unique identifier of the monitor alert.

    Returns:

      Object containing information about the monitor alert.

    Return type:

      MonitorAlert

  run()

    Reruns a given monitor alert from latest monitor instance

    Parameters:

      monitor_alert_id (str) – Unique identifier of a monitor alert.

    Returns:

      Object describing the monitor alert.

    Return type:

      MonitorAlert

  delete()

    Delets a monitor alert

    Parameters:

      monitor_alert_id (str) – The unique string identifier of the alert to delete.