Giter VIP home page Giter VIP logo

cs_monitor_plugin's Introduction

ComfortScheduler Monitor

Since Web2py had its own scheduler, too many peoples asked for an embedded monitoring solution. ComfortScheduler it's just my way of defining it. It bakes a lot of features and relies on a RDBMS, which most of web apps have anyway in their stack.
Right now the plugin scans the scheduler's tables, and it's a first step towards a more "precise" analyzing solution. Please try it and report back your findings.

INSTRUCTIONS:

  • download it and merge with your app's code

  • no cache is used ATM, but I'm planning to use that to avoid db pressure. Change in controllers/plugin_cs_monitor.py the lines

    sc_cache = cache.ram
    GROUPING_MODE = 'database' # or 'python'
    ANALYZE_CACHE_TIME = 60
    TASKS_SUMMARY_CACHE_TIME = 10

    to match your preferences

    sc_cache = cache.ram #your cache backend
    GROUPING_MODE = 'database' # or 'python', to save the db from some heavy queries
    ANALYZE_CACHE_TIME = 60 #how many seconds cache the queries done to analyze the task
    TASKS_SUMMARY_CACHE_TIME = 10 #how many seconds cache the queries for the task summary on the index page
  • the index() function is just a placeholder, every URL is generated with user_signature, so change the permission according to your requirements only in the index() function.

    @auth.requires_login()
    def index():
        return dict()

    e.g to

    @auth.requires_membership('superadministrators')
    def index():
        return dict()

TODO:

  • Groupings can be done in python too, to avoid db pressure
  • analyze_task works scanning scheduler_run results. It should detect automatically if no runs are there and switch groupings.
  • add REST interface ?

cs_monitor_plugin's People

Contributors

niphlod avatar ndegroot avatar

Watchers

 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.