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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for zenduty_airflow_operator-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca2a89f66cc6c11d8a7a30fe95d1a3ab0c487658a7373cd6bc28cf879f4ee02f |
|
MD5 | b3a9549a67ccbf2f4d4d3f2fb8abda4f |
|
BLAKE2b-256 | 597dbd26d1da70b7d23842c7cbb9b6514a6842c6dc499d96507e33bdda090c53 |
Close
Hashes for zenduty_airflow_operator-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b772f21a532c4cd3ce90da632f128e0a1e658cdf96f2291ae2daf295c7bf968 |
|
MD5 | f207db3aa5e394819231b5cde9eb5256 |
|
BLAKE2b-256 | 31bb98b6e0749301ff3952a2074d1d4089edfc9fb7f93f1f43127480b150ca7e |