Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Send summary messages of your Luigi jobs to Slack.

Project Description
## Luigi Monitor

![message](https://raw.github.com/hudl/luigi-monitor/master/message.png)

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)

```

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 for FAILURE and DEPENDENCY_MISSING
events.
* It only sends notifications via Slack
* If you have more than 5 notifications in a category (FAILURE or
DEPENDENCY_MISSING), it will notify you of that rather than posting
a long list of errors.
Release History

Release History

This version
History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
luigi_monitor-1.0.2-py2-none-any.whl (5.8 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Dec 15, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting