Skip to content

Latest commit

 

History

History
106 lines (73 loc) · 3.6 KB

AlertingServiceApi.md

File metadata and controls

106 lines (73 loc) · 3.6 KB

seldon_deploy_sdk.AlertingServiceApi

All URIs are relative to http://X.X.X.X/seldon-deploy/api/v1alpha1

Method HTTP request Description
alerting_service_list_alerts GET /alerting/alerts List currently firing alerts.
alerting_service_trigger_test_alert POST /alerting/test Triggers a test alert to check alerting workflow.

alerting_service_list_alerts

V1ListAlertsResponse alerting_service_list_alerts()

List currently firing alerts.

Example

from __future__ import print_function
import time
import seldon_deploy_sdk
from seldon_deploy_sdk.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
configuration = seldon_deploy_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = seldon_deploy_sdk.AlertingServiceApi(seldon_deploy_sdk.ApiClient(configuration))

try:
    # List currently firing alerts.
    api_response = api_instance.alerting_service_list_alerts()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AlertingServiceApi->alerting_service_list_alerts: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

V1ListAlertsResponse

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

alerting_service_trigger_test_alert

V1TriggerTestAlertResponse alerting_service_trigger_test_alert(use_metrics_flow)

Triggers a test alert to check alerting workflow.

Example

from __future__ import print_function
import time
import seldon_deploy_sdk
from seldon_deploy_sdk.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
configuration = seldon_deploy_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = seldon_deploy_sdk.AlertingServiceApi(seldon_deploy_sdk.ApiClient(configuration))
use_metrics_flow = true # bool | Set to true if you wish to test Prometheus -> Alertmanager connection False sends an alert payload directly to Alertmanager, skipping Prometheus metrics/alert flow

try:
    # Triggers a test alert to check alerting workflow.
    api_response = api_instance.alerting_service_trigger_test_alert(use_metrics_flow)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AlertingServiceApi->alerting_service_trigger_test_alert: %s\n" % e)

Parameters

Name Type Description Notes
use_metrics_flow bool Set to true if you wish to test Prometheus -> Alertmanager connection False sends an alert payload directly to Alertmanager, skipping Prometheus metrics/alert flow

Return type

V1TriggerTestAlertResponse

Authorization

OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]