Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niphlod/cs_monitor_plugin
Web2py plugin to monitor the scheduler
https://github.com/niphlod/cs_monitor_plugin
Last synced: 11 days ago
JSON representation
Web2py plugin to monitor the scheduler
- Host: GitHub
- URL: https://github.com/niphlod/cs_monitor_plugin
- Owner: niphlod
- Created: 2013-02-23T17:12:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-09T23:07:27.000Z (over 9 years ago)
- Last Synced: 2024-08-01T22:56:40.557Z (3 months ago)
- Language: Python
- Size: 688 KB
- Stars: 11
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
```python
sc_cache = cache.ram
GROUPING_MODE = 'database' # or 'python'
ANALYZE_CACHE_TIME = 60
TASKS_SUMMARY_CACHE_TIME = 10
```to match your preferences
```python
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.```python
@auth.requires_login()
def index():
return dict()
```
e.g to
```python
@auth.requires_membership('superadministrators')
def index():
return dict()
```
TODO:
- [x] Groupings can be done in python too, to avoid db pressure
- [x] analyze_task works scanning scheduler_run results. It should detect automatically if no runs are there and switch groupings.
- [ ] add REST interface ?