watchrs

Crates.io Documentation Build Status

watchrs is a crate that aids in monitoring and setting up alerts for AWS Batch Jobs.

Note: This is still under development and I would not consider it to be production ready yet.

Examples

Setting Up Alerts For Batch Job State Changes

```rust use watchrs::Watcher;

// First create and subscribe to a topic let watcher = Watcher::default(); watcher .subscribe("youremail@example.com".toowned(), None) .andthen(|(topicarn, _)| { watcher .createjobwatcherrule( "mybatchjobrule".toowned(), // enable? true, Some("watch failed jobs".toowned()), Some(vec!["FAILED".toowned(), "RUNNABLE".toowned()]), Some(vec!["JOBQUEUEARN".toowned()]), Some(vec!["JOBDEFINITIONNAME".toowned()]) ) .map(|rulename| (topicarn, rulename)) }) .andthen(|(topicarn, rulename)| { // create target watcher.createsnstarget(rulename, topic_arn) }) .expect("failed to create alerting system"); ```

Requirements

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.