Skip to main content

Alliance Auth plugin for monitoring celery tasks

Project description

Task Monitor

An Alliance Auth app for monitoring celery tasks.

release python django pipeline codecov license pre-commit Code style: black chat

Contents

Features

Task Monitor enables administrators to monitor celery tasks running on their system.

  • Stores full log with details of all recently executed celery tasks including failed and retried tasks.

  • Keeps the storage needs in check by automatically deleting older task logs

  • Admins can investigate task log with search & filters

  • Admins can view details for each task incl. exceptions and trace logs

  • Admins can review reports providing answers to common questions, e.g:

    • How many tasks have failed/retried?
    • How many tasks where run by each of my apps?
    • Which are the most frequent tasks?
    • Which tasks have the longest runtime?
    • Which tasks failed the most?
  • Admins can export all task logs to a CSV file for further analysis with 3rd party tools (e.g. Google sheets)

Screenshots

Full log of all recently executed tasks

tasklog

View details for each task incl. exception tracelogs

tasklog

The start of the reports page

tasklog

Installation

Step 1 - Check prerequisites

Task Monitor is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official AA installation guide for details)

Step 2 - Install app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:

pip install aa-taskmonitor

Step 3 - Configure Auth settings

Configure your Auth settings (local.py) as follows:

  • Add 'taskmonitor' to INSTALLED_APPS
  • Optional: Add additional settings if you want to change any defaults. See Settings for the full list.

Step 4 - Finalize App installation

Run migrations & copy static files

python manage.py migrate
python manage.py collectstatic --noinput

Restart your supervisor services for Auth.

Settings

Here is a list of available settings for this app. They can be configured by adding them to your AA settings file (local.py).

Note that all settings are optional and the app will use the documented default settings if they are not used.

Name Description Default
TASKMONITOR_DATA_MAX_AGE Max age of logged tasks in hours. Older logs be deleted automatically. 24
TASKMONITOR_HOUSEKEEPING_FREQUENCY Frequency of house keeping runs in minutes. 15
TASKMONITOR_REPORTS_MAX_AGE Max age of cached reports in minutes. 15
TASKMONITOR_REPORTS_MAX_TOP Max items to show in the top reports. e.g. 10 will shop the top ten items. 15

FAQ

Is it possible to store task logs longer then for just 24 hours?

Yes, there is a setting, which you can increase according to your needs. However, please keep in mind that your storage needs will increase accordingly. The current approx. usage is 0.5 KB per entry, so e.g. you need approx. 500 MB to store 1.000.000 task logs.

How is this app different from celery analytics?

Celery Analytics seams to be designed mainly as data source for reports on Grafana. It apparently works great if you want to integrate analysis about your task executions into a Grafana dashboards. But it's usability without Grafana is limited.

Task Monitor on the other hand aims to be fully functional standalone by providing reports and many useful features for analyzing your task logs directly on the admin site. It also provides a more complete picture, since Celery Analytics ignores retried tasks.

How is this app different from celery's flower?

Flower offers more detailed and technical information about task runs and might therefore be more most for developers. However, it not designed to store a larger number of task logs (default is only 10K) and is appears therefore to be less suited for Alliance Auth, where you typically have 100K+ tasks per day.

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

aa-taskmonitor-0.4.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_taskmonitor-0.4.1-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file aa-taskmonitor-0.4.1.tar.gz.

File metadata

  • Download URL: aa-taskmonitor-0.4.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for aa-taskmonitor-0.4.1.tar.gz
Algorithm Hash digest
SHA256 574ae11af172c78a32a0319d1c11f6ed63a7e3570f87b7e83b6c7adb416d76d1
MD5 927b03faf8b7eff258308204cfaf6765
BLAKE2b-256 13a5e0cc9964c54edbc6e218fa46dcf466b708d0190a5cb071249cc473d804a9

See more details on using hashes here.

File details

Details for the file aa_taskmonitor-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: aa_taskmonitor-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for aa_taskmonitor-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54c17c371b052736f42db0a1a1c47b7928dcf5be8ff4d91fc39df6afa5652401
MD5 b5811104291b5d2441334d5110710bb7
BLAKE2b-256 f60b7b62012e6d21c03e6a4ada1e2990de52d11d4f3d08ef4da6fe0397c09d92

See more details on using hashes here.

Supported by

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