Skip to content

sheffters/clusterDash

 
 

Repository files navigation

ClusterDash

ClusterDash is based on the psdash repo, but it supports a cluster of machine, this is benefit for distributed system monitor, clusterDash use the Rpyc to collect the remote machine state.

usage

  • install the clusterDash in every machine you want to monitor
  • fill the hostname of the machine you want to monitor in the slave file
  • start the monitor at every machine using: python server.py --log /var/log/metrics.log &
  • star the client on one of the machine(which will collect all the info you need) : python web.py --log /var/log/client.log &
  • typing the following url in your web browser, and you will see all the system metrics.(cpu, network, disks etc). Take for example: if you set the husky004 as the master, and husky002, husky003 as the machine you want to monitor, you just need to type the following url to see the status of husky002: http://husky004:5000/husky002

The following info is about psdash, clusterDash is based on psdash, so it support all the following metrics.

Features includes:

  • Overview
    Dashboard overview of the system displaying data on cpu, disks, network, users, memory, swap and network.

  • Processes
    List processes (top like) and view detailed process information about each process.

    Apart from a detailed process overview this is also available for each process:

    • Open files
    • Open connections
    • Memory maps
    • Child processes
    • Resource limits
  • Disks
    List info on all disks and partitions

  • Network
    List info on all network interfaces and the current throughput.

  • Logs
    Tail and search logs

  • All data is updated automatically, no need to refresh

The GUI is pretty much a modified bootstrap example as I'm no designer at all. If you got a feel for design and like to improve the UI parts of psdash, please create a pull request with your changes. It would be much appreciated as there's much room for improvements.

Getting started

Installation using pip:
pip install psdash

Since pip 1.5.1 you are forced to add --allow-external argparse since the latest argparse is hosted on google code.

Installation from source:
python setup.py install

Starting psdash:
psdash --log /var/log/myapp.log --log /var/log/mydb.log

Available command-line arguments:

usage: psdash [-h] [-l path] [-b host] [-p port] [-d]

psdash 0.3.0 - system information web dashboard

optional arguments:
  -h, --help            show this help message and exit
  -l path, --log path   log files to make available for psdash. This option
                        can be used multiple times.
  -b host, --bind host  host to bind to. Defaults to 0.0.0.0 (all interfaces).
  -p port, --port port  port to listen on. Defaults to 5000.
  -d, --debug           enables debug mode.

Configuration

psdash uses the configuration handling offered by Flask. The configuration file pointed to by the environment varible PSDASH_CONFIG will be read on startup.
e.g: PSDASH_CONFIG=/home/user/config.py psdash --log /var/log/dmesg

Apart from Flask's built-in configuration values there's a few psdash specific ones as well:

PSDASH_AUTH_USERNAME
When this value and PSDASH_AUTH_PASSWORD is set, Basic Authentication will be enabled with the provided credentials. The username of the basic authentication

PSDASH_AUTH_PASSWORD
The password of the basic authentication

PSDASH_ALLOWED_REMOTE_ADDRESSES
If this is set, only provided ip addresses will be allowed to access psdash.

Addresses is separated by a comma.
e.g: PSDASH_ALLOWED_REMOTE_ADDRESSES = "10.0.0.2, 192.29.20.2"

PSDASH_URL_PREFIX
This can be used to make psdash serve from a non-root location.

e.g: PSDASH_URL_PREFIX = "/psdash" would make psdash serve it's pages from /psdash

License

Released under CC0 (Public Domain Dedication).

http://creativecommons.org/publicdomain/zero/1.0/

About

This is a cluster dash from the psdash repo

Resources

License

Stars

Watchers

Forks

Packages

No packages published