This is a simple WebSockets based Dstat Server & Client. You can run it on your local or remote server, and use it to realtime monitoring.
With a beatifull Highcharts lib, this tool becomes very helpfull when you want to do some benchmarks on your server, and to see it as a graph, rather then dry numbers.
DRAFT!!!!
To install it on the server:
- Install dstat
- Install additional plugins just by copying .py files from any repository to /usr/share/dstat/plugins
- Test it by running "dstat" in console
- Clone https://github.com/spaiz/dstatrt.git repository or download and unzip https://github.com/spaiz/dstatrt/archive/master.zip
- Cut & past dstatrt/client directory to local storage. This is your web client.
- Upload dstatrt directory to the server without the client directory.
- Install node's modules by typing npm install from dstatrt directory
- Run it from dstatrt directory by running node app.js
Install process. I assume you have node.js, Python and git preinstalled. Run this in terminal as root:
- apt-get install dstat
- cd ~
- git clone https://github.com/spaiz/dstatrt.git
- cd dstatrt
- npm install
- node start.js
- Open client/index.html file in any browser. Best works with Chrome.
You can edit dstatrt/config.js file. You can enable/disable dstat plugins, defined enviroment variables for MySQL, Mongodb, Redis ad etc.
Additional notes. To be able to use such helpfull plugins as mysql5-* and mongoddb, you must have this things to be installed.
- "pip install pymongo" to be able use --mongodb plugin
- "apt-get install python-mysqldb" to be able to use --mysql5-* plugins
- Remember to change login & password for MySQL in dstat/config.js
- Remember to copy mongodb plugin dstat_mongodb_cmds.py from https://github.com/gianpaj/dstat/tree/master/plugins to /usr/share/dstat/plugins/ to be able use plugin --mongodb-cmds
Official dstat github: https://github.com/dagwieers/dstat
You can also download additional plugins (for example dstat_mongodb_cmds.py) from here: https://github.com/gianpaj/dstat/tree/master/plugins
p.s
Have a problem? Do debug: true in config and run node worker.
-
Problem: No module named MySQLdb
Solution: sudo pip2.7 install MySQL-python
-
Module dstat_memcache_hits failed to load. (Plugin needs the memcache module)
Solution: sudo apt-get install memcached sudo apt-get install libmemcached-tools