Skip to main content

This Airflow plugin creates a Zenduty Alert when it is run.

Project description

Airflow Plugin - Zenduty

This plugin creates a Zenduty Alert when plugin is run.

Operators

ZendutyIncidentOperator

This operator composes the logic for this plugin. It generates an Incident on Zenduty by sending an Alert to Zenduty. It accepts the following parameters:

  • api_key: API Key generated by Zenduty (Required).
  • integration_id: The Integration_id generated by the API Integration (Required).
  • title: Title of the incident that is to be created.
  • summary: Summary for the incident to be created.

Requirements

This plugin requires the zenduty-api python package.

Example Failure Callback Usage

from airflow.models import DAG, Variable
from airflow.operators.bash_operator import BashOperator
from zenduty_airflow_operator import ZendutyIncidentOperator

my_test_dag = DAG('example')

op = BashOperator(
    dag=my_test_dag,
    task_id='my_task',
    provide_context=True,
    python_callable=my_python_job,
    on_failure_callback=zenduty_incident
)
    
def zenduty_incident():

    operator = ZendutyIncidentOperator(
        api_key=Variable.get("api_key"),
        integration_id=Variable.get("integration_id"),
        title="Test Title",
        summary="Test Summary"
    )

    return operator.execute()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenduty_airflow_operator-0.1.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

zenduty_airflow_operator-0.1.2-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page