Skip to main content
Version: 0.17.23

PagerdutyAlertAction

class great_expectations.checkpoint.PagerdutyAlertAction(data_context: AbstractDataContext, api_key: str, routing_key: str, notify_on: str = 'failure', severity: str = 'critical')#

Sends a PagerDuty event.

- name: send_pagerduty_alert_on_validation_result
action:
class_name: PagerdutyAlertAction
api_key: ${pagerduty_api_key}
routing_key: ${pagerduty_routing_key}
notify_on: failure
severity: critical

Parameters:
  • data_context – Data Context that is used by the Action.

  • api_key – Events API v2 key for pagerduty.

  • routing_key – The 32 character Integration Key for an integration on a service or on a global ruleset.

  • notify_on – Specifies validation status that triggers notification. One of "all", "failure", "success".

  • severity – The PagerDuty severity levels determine the level of urgency. One of "critical", "error", "warning", or "info".

run(validation_result_suite: ExpectationSuiteValidationResult, validation_result_suite_identifier: Union[ValidationResultIdentifier, GXCloudIdentifier], data_asset, expectation_suite_identifier: Optional[ExpectationSuiteIdentifier] = None, checkpoint_identifier=None, **kwargs)#

Public entrypoint GX uses to trigger a ValidationAction.

When a ValidationAction is configured in a Checkpoint, this method gets called after the Checkpoint produces an ExpectationSuiteValidationResult.

Parameters:
  • validation_result_suite – An instance of the ExpectationSuiteValidationResult class.

  • validation_result_suite_identifier – an instance of either the ValidationResultIdentifier class (for open source Great Expectations) or the GXCloudIdentifier (from Great Expectations Cloud).

  • data_asset – An instance of the Validator class.

  • expectation_suite_identifier – Optionally, an instance of the ExpectationSuiteIdentifier class.

  • checkpoint_identifier – Optionally, an Identifier for the Checkpoint.

  • kwargs – named parameters that are specific to a given Action, and need to be assigned a value in the Action's configuration in a Checkpoint's action_list.

Returns:

A Dict describing the result of the Action.