## Luigi Monitor
[](https://img.shields.io/pypi/v/luigi-monitor.svg)
[](https://img.shields.io/pypi/l/luigi-monitor.svg)
[](https://img.shields.io/pypi/pyversions/luigi-monitor.svg)
[](https://img.shields.io/pypi/format/luigi-monitor.svg)
[](https://travis-ci.org/hudl/luigi-monitor)

Send summary messages of your Luigi jobs to Slack.
### Overview
[Luigi](https://github.com/spotify/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:
```python
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:
```python
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.
```python
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
[](https://img.shields.io/pypi/v/luigi-monitor.svg)
[](https://img.shields.io/pypi/l/luigi-monitor.svg)
[](https://img.shields.io/pypi/pyversions/luigi-monitor.svg)
[](https://img.shields.io/pypi/format/luigi-monitor.svg)
[](https://travis-ci.org/hudl/luigi-monitor)

Send summary messages of your Luigi jobs to Slack.
### Overview
[Luigi](https://github.com/spotify/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:
```python
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:
```python
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.
```python
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 luigi-monitor 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| luigi-monitor-1.1.4.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luigi_monitor-1.1.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / luigi-monitor-1.1.4.tar.gz
| Download URL | luigi-monitor-1.1.4.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
111661fc9771f7da5404d16d1415f2fe75d9b65ca7c926fe4b718218d35aae77
|
|
BLAKE2b-256 checksum How to use checksums |
61a4b170904b6a9a5c49a39231c582bd7bed3692ed4326542f6319437803b427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Release files / luigi_monitor-1.1.4-py2.py3-none-any.whl
| Download URL | luigi_monitor-1.1.4-py2.py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3dad3b2e9a67c9edffa7234e9d28631d680b009bf4f68e4971737c829477ee53
|
|
BLAKE2b-256 checksum How to use checksums |
c303a4355514559a00a36370dc29358214049daa6cd9dc968e34db8274b227ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|