DataDog/dogapi — pull request #63 by clofresh (2013-09-17 19:43:16+00:00)
Title: Wrap command

From the module docstring:

Wraps shell commands and sends the result to Datadog as events. Ex:

```
python -m dogapi.wrap -n test-job -k $API_KEY --submit_mode all "ls -lah"
```

Note that you need to enclose your command in quotes to prevent python
from thinking the command line arguments belong to the python command
instead of the wrapped command.

You can also have the script only send events if they fail:

```
python -m dogapi.wrap -n test-job -k $API_KEY --submit_mode errors "ls -lah"
```

And you can give the command a timeout too:

```
python -m dogapi.wrap -n test-job -k $API_KEY --timeout=1 "sleep 3"
```

Sample event:

![wrap](https://f.cloud.github.com/assets/15370/1159933/573405ee-1fd1-11e3-92e9-b683b3b4c555.png)