hopsworks.core.alerts_api #
AlertsApi #
Alerts API handle.
To obtain an object of this type, use project.get_alerts_api.
Returned by
create_alert_receiver #
create_alert_receiver(
name: str,
email_configs: list[alert_receiver.EmailConfig]
| None = None,
slack_configs: list[alert_receiver.SlackConfig]
| None = None,
pagerduty_configs: list[alert_receiver.PagerDutyConfig]
| None = None,
webhook_configs: list[alert_receiver.WebhookConfig]
| None = None,
) -> alert_receiver.AlertReceiver
Create a new alert receiver.
Example
| PARAMETER | DESCRIPTION |
|---|---|
name | The name of the alert receiver (e.g., email, webhook). TYPE: |
email_configs | List of email configurations. TYPE: |
slack_configs | List of Slack configurations. TYPE: |
pagerduty_configs | List of PagerDuty configurations. TYPE: |
webhook_configs | List of webhook configurations. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert_receiver.AlertReceiver | The created alert receiver object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If multiple configurations are provided. |
ValueError | If the global channel for the configuration is not configured. |
TimeoutError | If the alert receiver creation times out. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
create_feature_group_alert #
create_feature_group_alert(
feature_store_id: int,
feature_group_id: int,
receiver: str,
status: _VALIDATION_STATUS_ARG | _MONITORING_STATUS_ARG,
severity: _SEVERITY_ARG,
) -> alert.FeatureGroupAlert
Create a new feature group alert.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_group_id | The ID of the feature group. TYPE: |
receiver | The receiver of the alert (e.g., email, webhook). TYPE: |
status | The status that will trigger the alert (feature_validation_success, feature_validation_warning, feature_validation_failure, monitoring_shift_undetected, monitoring_shift_detected, monitoring_empty_detection_window). The names feature_monitor_shift_undetected and feature_monitor_shift_detected are deprecated since ~=3.8.1 and will be removed in a future release. TYPE: |
severity | The severity of the alert (warning, critical, info). TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.FeatureGroupAlert | The created FeatureGroupAlert object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If the status is not valid. |
ValueError | If the severity is not valid. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
create_feature_view_alert #
create_feature_view_alert(
feature_store_id: int,
feature_view_name: str,
feature_view_version: int,
receiver: str,
status: _MONITORING_STATUS_ARG,
severity: _SEVERITY_ARG,
) -> alert.FeatureViewAlert
Create a new feature view alert.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_view_name | The name of the feature view. TYPE: |
feature_view_version | The version of the feature view. TYPE: |
receiver | The receiver of the alert (e.g., email, webhook). TYPE: |
status | The status that will trigger the alert (monitoring_shift_undetected, monitoring_shift_detected, monitoring_empty_detection_window). The names feature_monitor_shift_undetected and feature_monitor_shift_detected are deprecated since ~=3.8.1 and will be removed in a future release. TYPE: |
severity | The severity of the alert (warning, critical, info). TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.FeatureViewAlert | The created FeatureViewAlert object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError | if status is not valid. |
ValueError | if severity is not valid. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
create_job_alert #
create_job_alert(
job_name: str,
receiver: str,
status: _JOB_STATUS_ARG,
severity: _SEVERITY_ARG,
) -> alert.JobAlert
Create a new job alert.
Example
| PARAMETER | DESCRIPTION |
|---|---|
job_name | The name of the job. TYPE: |
receiver | The receiver of the alert (e.g., email, webhook). TYPE: |
status | The status of the alert (finished, failed, killed, long_running). TYPE: |
severity | The severity of the alert (warning, critical, info). TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.JobAlert | The created JobAlert object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If the job name is not provided. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
create_project_alert #
create_project_alert(
receiver: str,
status: _PROJECT_FS_STATUS_ARG
| _PROJECT_JOB_STATUS_ARG,
severity: _SEVERITY_ARG,
service: _SERVICES_ARG,
threshold: int = 0,
) -> alert.ProjectAlert
Create a new alert.
Example
| PARAMETER | DESCRIPTION |
|---|---|
receiver | The receiver of the alert (e.g., email, webhook). TYPE: |
status | The status that will trigger the alert (job_finished, job_failed, job_killed, job_long_running, feature_validation_success, feature_validation_warning, feature_validation_failure, monitoring_shift_undetected, monitoring_shift_detected, monitoring_empty_detection_window). The names feature_monitor_shift_undetected and feature_monitor_shift_detected are deprecated since ~=3.8.1 and will be removed in a future release. TYPE: |
severity | The severity of the alert (warning, critical, info). TYPE: |
service | The service associated with the alert (Featurestore, Jobs). TYPE: |
threshold | The threshold for the alert. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.ProjectAlert | The created ProjectAlert object. |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If the service is not Featurestore or Jobs, or if the status is not valid for the specified service. |
ValueError | If the severity is not valid. |
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
delete_alert #
delete_alert(alert_id: int)
Delete an alert by ID.
Example
| PARAMETER | DESCRIPTION |
|---|---|
alert_id | The ID of the alert to delete. TYPE: |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_alert #
get_alert(alert_id: int) -> alert.ProjectAlert | None
Get a specific project alert by ID.
Example
| PARAMETER | DESCRIPTION |
|---|---|
alert_id | The ID of the alert to retrieve. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.ProjectAlert | None | The ProjectAlert object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_alert_receiver #
get_alert_receiver(
name: str,
) -> alert_receiver.AlertReceiver | None
Get a specific alert receivers by name.
Example
| PARAMETER | DESCRIPTION |
|---|---|
name | The name of the alert receiver to retrieve. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert_receiver.AlertReceiver | None | The alert receiver object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_alert_receivers #
get_alert_receivers() -> list[alert_receiver.AlertReceiver]
Get all alert receivers.
Example
| RETURNS | DESCRIPTION |
|---|---|
list[alert_receiver.AlertReceiver] | List of alert receivers. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_alerts #
get_alerts() -> list[alert.ProjectAlert]
Get all project alerts.
Example
| RETURNS | DESCRIPTION |
|---|---|
list[alert.ProjectAlert] | List of ProjectAlert objects. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_feature_group_alert #
get_feature_group_alert(
feature_store_id: int,
feature_group_id: int,
alert_id: int,
) -> alert.FeatureGroupAlert | None
Get a specific feature group alert by ID.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_group_id | The ID of the feature group. TYPE: |
alert_id | The ID of the alert to retrieve. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.FeatureGroupAlert | None | The FeatureGroupAlert object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_feature_group_alerts #
get_feature_group_alerts(
feature_store_id: int, feature_group_id: int
) -> list[alert.FeatureGroupAlert]
Get all feature group alerts.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_group_id | The ID of the feature group. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
list[alert.FeatureGroupAlert] | List of FeatureGroupAlert objects. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_feature_view_alert #
get_feature_view_alert(
feature_store_id: int,
feature_view_name: str,
feature_view_version: int,
alert_id: int,
) -> alert.FeatureViewAlert | None
Get a specific feature view alert by ID.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_view_name | The name of the feature view. TYPE: |
feature_view_version | The version of the feature view. TYPE: |
alert_id | The ID of the alert to retrieve. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.FeatureViewAlert | None | The FeatureViewAlert object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_feature_view_alerts #
get_feature_view_alerts(
feature_store_id: int,
feature_view_name: str,
feature_view_version: int,
) -> list[alert.FeatureViewAlert]
Get all feature view alerts.
Example
| PARAMETER | DESCRIPTION |
|---|---|
feature_store_id | The ID of the feature store. TYPE: |
feature_view_name | The name of the feature view. TYPE: |
feature_view_version | The version of the feature view. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
list[alert.FeatureViewAlert] | List of FeatureViewAlert objects. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_job_alert #
Get a specific job alert by ID.
Example
| PARAMETER | DESCRIPTION |
|---|---|
job_name | The name of the job. TYPE: |
alert_id | The ID of the alert to retrieve. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
alert.JobAlert | None | The JobAlert object. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_job_alerts #
Get all job alerts.
Example
| PARAMETER | DESCRIPTION |
|---|---|
job_name | The name of the job. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
list[alert.JobAlert] | List of JobAlert objects. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
get_triggered_alerts #
get_triggered_alerts(
active: bool = True,
silenced: bool = False,
inhibited: bool = False,
) -> list[triggered_alert.TriggeredAlert]
Get triggered alerts.
Example
| PARAMETER | DESCRIPTION |
|---|---|
active | Whether to include active alerts. TYPE: |
silenced | Whether to include silenced alerts. TYPE: |
inhibited | Whether to include inhibited alerts. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
list[triggered_alert.TriggeredAlert] | The triggered alert objects. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
trigger_alert #
trigger_alert(
receiver_name: str,
title: str,
summary: str,
description: str,
severity: _SEVERITY_ARG,
status: str,
name: str,
generator_url: str | None = None,
expire_after_sec: int | None = None,
)
Trigger an alert.
Example
| PARAMETER | DESCRIPTION |
|---|---|
receiver_name | The receiver of the alert (e.g., email, webhook). TYPE: |
title | The title of the alert. TYPE: |
summary | The summary of the alert. TYPE: |
description | The description of the alert. TYPE: |
severity | The severity of the alert (warning, critical, info). TYPE: |
status | The status of the alert. TYPE: |
name | The name of the alert. TYPE: |
generator_url | The URL of the alert generator. TYPE: |
expire_after_sec | The time in seconds after which the alert should expire. TYPE: |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |