Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


alasconnect/sensu-airflow-check

v0.1.0 · public · Published over 3 years ago

README
Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
Go Test
goreleaser

sensu-airflow-check

Table of Contents

Overview

The sensu-airflow-check is a Sensu Check that provides monitoring for airflow and DAGs.

Checks

This collection contains the following checks:

  • airflow-check - for checking the health of the airflow metadatabase and scheduler.
  • airflow-import-check - for checking DAG import errors.
  • airflow-dag-check - for checking DAG runs for all or a specific list of DAGs.

Usage examples

airflow-check --url http://localhost:8080/
# Will check all loaded DAGs
airflow-dag-check --url http://localhost:8080/ --username admin --password admin
# Will check specific DAGs and will fail if one of the DAGs does not exist
airflow-dag-check --url http://localhost:8080/ --username admin --password admin --dag my_dag_id --dag my_other_dag_id

Configuration

The airflow API must be configured.
Typically, this means setting the following line in the [api] section:

auth_backend = airflow.api.auth.backend.basic_auth

Asset registration

Sensu Assets are the best way to make use of this plugin. If you're not using an asset, please
consider doing so! If you're using sensuctl 5.13 with Sensu Backend 5.13 or later, you can use the
following command to add the asset:

sensuctl asset add alasconnect/sensu-airflow-check

If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][https://bonsai.sensu.io/assets/alasconnect/sensu-airflow-check].

Check definition

airflow-check

---
type: CheckConfig
api_version: core/v2
metadata:
  name: airflow-check
  namespace: default
spec:
  command: airflow-check --url {url}
  subscriptions:
  - system
  runtime_assets:
  - alasconnect/sensu-airflow-check

airflow-import-check

---
type: CheckConfig
api_version: core/v2
metadata:
  name: airflow-import-check
  namespace: default
spec:
  command: airflow-import-check --url {url} --username {username} --password {password}
  subscriptions:
  - system
  runtime_assets:
  - alasconnect/sensu-airflow-check

airflow-dag-check

---
type: CheckConfig
api_version: core/v2
metadata:
  name: airflow-dag-check
  namespace: default
spec:
  command: airflow-dag-check --url {url} --username {username} --password {password} --dag {dag_id_1} --dag {dag_id_2}
  subscriptions:
  - system
  runtime_assets:
  - alasconnect/sensu-airflow-check

Installation from source

The preferred way of installing and deploying this plugin is to use it as an Asset. If you would
like to compile and install the plugin from source or contribute to it, download the latest version
or create an executable script from this source.

From the local path of the sensu-airflow-check repository:

go build -o bin/airflow-check ./cmd/airflow-check
go build -o bin/airflow-import-check ./cmd/airflow-import-check
go build -o bin/airflow-dag-check ./cmd/airflow-dag-check

Additional notes

Contributing

For more information about contributing to this plugin, see Contributing.

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

Either download the source code:

Download Source

Or download the asset definition: