forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIRFLOW-3177] Change scheduler_heartbeat from gauge to counter (apac…
…he#4027) This updates the scheduler_heartbeat metric from a gauge to a counter to better support the statsd_exporter for usage with Prometheus. A counter allows users to track the rate of the heartbeat, and integrates with the exporter better. A crashing or down scheduler will no longer emit the metric, but the statsd_exporter will continue to show a 1 for the metric value. This fixes that issue because a counter will continually change, and the lack of change indicates an issue with the scheduler. Add statsd change notice in UPDATING.md
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,68 @@ that he has permissions on. If a new role wants to access all the dags, the admi | |
|
||
We also provide a new cli command(``sync_perm``) to allow admin to auto sync permissions. | ||
|
||
|
||
### min_file_parsing_loop_time config option temporarily disabled | ||
|
||
The scheduler.min_file_parsing_loop_time config option has been temporarily removed due to | ||
some bugs. | ||
|
||
### new `sync_parallelism` config option in celery section | ||
|
||
The new `sync_parallelism` config option will control how many processes CeleryExecutor will use to | ||
fetch celery task state in parallel. Default value is max(1, number of cores - 1) | ||
|
||
### CLI Changes | ||
|
||
The ability to manipulate users from the command line has been changed. 'airflow create_user' and 'airflow delete_user' and 'airflow list_users' has been grouped to a single command `airflow users` with optional flags `--create`, `--list` and `--delete`. | ||
|
||
Example Usage: | ||
|
||
To create a new user: | ||
```bash | ||
airflow users --create --username jondoe --lastname doe --firstname jon --email [email protected] --role Viewer --password test | ||
``` | ||
|
||
To list users: | ||
```bash | ||
airflow users --list | ||
``` | ||
|
||
To delete a user: | ||
```bash | ||
airflow users --delete --username jondoe | ||
``` | ||
|
||
### StatsD Metrics | ||
|
||
The `scheduler_heartbeat` metric has been changed from a gauge to a counter. Each loop of the scheduler will increment the counter by 1. This provides a higher degree of visibility and allows for better integration with Prometheus using the [StatsD Exporter](https://github.com/prometheus/statsd_exporter). Scheduler upness can be determined by graphing and alerting using a rate. If the scheduler goes down, the rate will drop to 0. | ||
|
||
### Custom auth backends interface change | ||
|
||
We have updated the version of flask-login we depend upon, and as a result any | ||
custom auth backends might need a small change: `is_active`, | ||
`is_authenticated`, and `is_anonymous` should now be properties. What this means is if | ||
previously you had this in your user class | ||
|
||
def is_active(self): | ||
return self.active | ||
|
||
then you need to change it like this | ||
|
||
@property | ||
def is_active(self): | ||
return self.active | ||
|
||
## Airflow 1.10 | ||
|
||
Installation and upgrading requires setting `SLUGIFY_USES_TEXT_UNIDECODE=yes` in your environment or | ||
`AIRFLOW_GPL_UNIDECODE=yes`. In case of the latter a GPL runtime dependency will be installed due to a | ||
dependency (python-nvd3 -> python-slugify -> unidecode). | ||
|
||
### Replace DataProcHook.await calls to DataProcHook.wait | ||
|
||
The method name was changed to be compatible with the Python 3.7 async/await keywords | ||
|
||
### Setting UTF-8 as default mime_charset in email utils | ||
|
||
### Add a configuration variable(default_dag_run_display_number) to control numbers of dag run for display | ||
|
This file contains 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