Giter VIP home page Giter VIP logo

cron-monitor's Introduction

Cron Monitor - First Phase

A basic Sinatra app to monitor crons. Alerts you if a cron has started and not ended or if a cron has not started within the specified time.

All you need to do is curl a url before and after a cron runs

Before cron - http://localhost:5000/ping?name=cron_name&et=approx_time_taken_to_run&pf=time_between_2_runs&status=start

After cron - http://localhost:5000/ping?name=cron_name&et=approx_time_complete_run&status=compelte

TODO

Integrations - Slack, HipChat

Configuration

Dependencies and all configuration is done in environment.rb. Your database is also set up here. DataMapper will use mysql by default in this app. Tests use the sqlite3-memory adapter (no configuration needed).

Add your controller actions in application.rb. Views for these actions are placed in the views directory. Static files, including a stock stylesheet, go in the public directory. Models go in the lib directory and are auto-loaded.

Environment variables that you want to expose to your application can be added in .env

Testing

It needs proper specs

Add your specs in spec; just require spec_helper.rb to pre-configure the test environment. A number of samples are provided (including a sample model, which can be removed). To run the specs:

bundle exec rake spec

Getting Started

bundle install
bundle exec foreman start

Extras

We've included a handy console script that fires up irb with your environment loaded. To load it, use the Rake task:

bundle exec rake console

Credits

The sinatra template has been adapted from Nick Plante.

cron-monitor's People

Watchers

James Cloos avatar

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.