Luigi Monitor
Send summary messages of your Luigi jobs to Slack.
Overview
Luigi is a great tool for making job pipelines, but it's hard to know the status of a run. Luigi has support for error emails, but this requires configuring your machine to send email, which is a hassle for short-lived EMR clusters. Further, it sends an email for every failure, which can quickly swamp your inbox.
By contrast, this tool gathers all your failures and missing dependencies and sends a summary Slack message when the job is finished.
Usage
With default app username:
import luigi
from luigi_monitor import monitor
...
if __name__ == "__main__":
with monitor(slack_url=<your_slack_url>, max_print=10):
luigi.run(main_task_cls=MainClass)
With dynamic app username:
import luigi
from luigi_monitor import monitor
...
if __name__ == "__main__":
with monitor(slack_url=<your_slack_url>, max_print=10, username="FooBar Monitor"):
luigi.run(main_task_cls=MainClass)
Monitoring and notifying on various events:
Currently supports: SUCCESS, DEPENDENCY_MISSING, and FAILURE
By default, all three of the above are monitored and notified on. If, SUCCESS event is monitored and
all tasks succeed then the notification text is "Job ran successfully" instead of listing all
successful tasks.
import luigi
from luigi_monitor import monitor
...
if __name__ == "__main__":
with monitor(slack_url=<your_slack_url>, events=['DEPENDENCY_MISSING', 'FAILURE']):
luigi.run(main_task_cls=MainClass)
Alternatively:
luigi-monitor --module path.to.module TaskName
NB: if you plan to use luigi-monitor from the command line, set options using luigi.cfg:
[luigi-monitor]
slack_url=<slack_hook>
max_print=<int>
username=<string>
This is a work in progress. Particularly, note that:
- It only sends notifications via Slack
Metadata
Release files for fluigi-monitor 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fluigi-monitor-1.1.6.tar.gz | 4.6 kB | Without provenance | Details for fluigi-monitor-1.1.6.tar.gz |
Release files / fluigi-monitor-1.1.6.tar.gz
| Download URL | fluigi-monitor-1.1.6.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f27522597276f1a0345e3f6cd46d9f43d2446c8ecb2352342cf8117a7e6b358c
|
|
BLAKE2b-256 checksum How to use checksums |
42d26475dbbccbf8311d0b1c2006edf83a5b626b6f8aa1f622ba898be5e30efe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for fluigi-monitor 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.