OpsgenieAlertOperator

Opsgenie

This operator allows you to post alerts to Opsgenie. Accepts a connection that has an Opsgenie API key as the connection’s password. This operator sets the domain to conn_id.host, and if not set will default to https://api.opsgenie.com.

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Opsgenie provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

opsgenie_conn_idstrThe name of the Opsgenie connection to use
messagestrThe Message of the Opsgenie alert (templated)
aliasstrClient-defined identifier of the alert (templated)
descriptionstrDescription field of the alert (templated)
responderslist[dict]Teams, users, escalations and schedules that the alert will be routed to send notifications.
visible_tolist[dict]Teams and users that the alert will become visible to without sending any notification.
actionslist[str]Custom actions that will be available for the alert.
tagslist[str]Tags of the alert.
detailsdictMap of key-value pairs to use as custom properties of the alert.
entitystrEntity field of the alert that is generally used to specify which domain alert is related to. (templated)
sourcestrSource field of the alert. Default value is IP address of the incoming request.
prioritystrPriority level of the alert. Default value is P3. (templated)
userstrDisplay name of the request owner.
notestrAdditional note that will be added while creating the alert. (templated)

Documentation

This operator allows you to post alerts to Opsgenie. Accepts a connection that has an Opsgenie API key as the connection’s password. This operator sets the domain to conn_id.host, and if not set will default to https://api.opsgenie.com.

Each Opsgenie API key can be pre-configured to a team integration. You can override these defaults in this operator.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?