Last active
April 30, 2020 06:17
-
-
Save rootcss/c0737888b48a554504c2da9cef5eabd9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // alert if scheduler is down. | |
| stream | |
| |from() | |
| .measurement('prefix_scheduler_heartbeat') | |
| |deadman(0.0, 5m) | |
| .id('AirflowSchedulerDown') | |
| .message('Airflow Scheduler is down') | |
| .log('/tmp/alert_logs.txt') | |
| .trigger_alert_method() | |
| // alert if worker count does not match the required value | |
| stream | |
| |from() | |
| .measurement('prefix_celery_workers') | |
| |window() | |
| .period(5m) | |
| .every(5m) | |
| |alert() | |
| .id('Celery Workers Count') | |
| .crit(lambda: "value" <= 2) | |
| .warn(lambda: "value" <= 3) | |
| .log('/tmp/alert_2.txt') | |
| .trigger_alert_method() | |
| // reference: https://docs.influxdata.com/kapacitor/v1.5/tick/introduction/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment