Coder Social home page Coder Social logo

objstat's Introduction

ObjStat

Simple status reporting websites

Screenshot

Creating checks

Each check comes in the form of a python function in the checks folder, the filename may be arbitrary

def check_https(host):
    ...

Each check must also return a dictionary, containing the keys success and message.

A check may optionally return a history=False in order to turn off the default history recording

return dict(success=True, message='My check properly returns data!', history=False)

All function names starting with __ are ignored

Running from the command line

Running objstat requires some knowledge of the checks written.

Command line arguments are parsed directly into the checks themselves, the func parameter tells objstat which check to make use of, 3 checks are available by default, check_nfs, check_http and check_https. All arguments after this initial check specification are parsed as kwargs into the check function itself

For example, to call a method check_https with the parameters host, we would use:

user@host - $ objstat.py func check_https host twitter.com
user@host - $ python -m SimpleHTTPServer

And navigate to http://localhost:8000

Configuring crontab

Crontab can be used to automatically run checks.

*/30 * * * * objstat.py func check_http host www.reddit.com
*/15 * * * * objstat.py func check_https host twitter.com

objstat's People

Contributors

stevommmm avatar

Watchers

 avatar 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.