Code Monkey home page Code Monkey logo

dogtrainer's People

Contributors

irabinovitch avatar jantman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

empath

dogtrainer's Issues

Handle error in upsert_timeboard

I tried creating a graph that had an incorrect graph definition. The traceback wasn't helpful at all:

 INFO API: Upserting timeboard: circleci-builder-dev
Found 198 existing timeboards in DataDog
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/home/jantman/manheim/git/Tooling/terraform-circleci-builder/vendor/ruby/2.1.0/gems/dogtrainer-0.2.0/lib/dogtrainer/api.rb:531:in `upsert_timeboard'
/home/jantman/manheim/git/Tooling/terraform-circleci-builder/lib/datadog_helpers.rb:149:in `setup_dashboard'
/home/jantman/manheim/git/Tooling/terraform-circleci-builder/Rakefile:79:in `block in <top (required)>'
Tasks: TOP => datadog
(See full trace by running task with --trace)

It turns out that DataDog's API returned a 400, but dogapi doesn't treat this as an error, it just returns a normal array; @dog.create_dashboard() returns:

["400", {"errors"=>["Error(s) found in query:\nError parsing query: \n avg:circlecienterprise.circlerunqueuebuilds\n                                           ^\nExpected \"{\" (at char 43), (line:1, col:44) "]}]

Handle parameters for service check monitors

We should also allow creation of service check monitors. To do this, we should add or expose the following:

  • expose message in the upsert_monitor() call so we can override it
  • handle thresholds as a Hash, with keys "warning", "critical" and "ok"
  • expose renotify_interval

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.