Coder Social home page Coder Social logo

cstat's Introduction

cstat

A visual stat tool for CrateDB clusters.

cstat is ispired by the awesome interactive process monitoring tool htop. cstat should be a similar tool to iostat, but for monitoring CrateDB clusters.

Screenshot of cstat in action

Requirements

cstat requires Python >= 3.6 and can connect to CrateDB >= 2.3.

Installation

cstat is available from Pypi so you can install it using pip.

pip install cstat

If you want to get the latest features and fixes, you can also install it directly from Github.

pip install git+https://github.com/chaudum/crate-top.git@master

Usage

After installation you can monitor CrateDB running on localhost with default configuration by invoking the following command:

>>> cstat --user crate

A full list of command line arguments are listed when invoking cstat with the --help argument:

>>> cstat --help
usage: cstat [-h] [--host HOST] [--port PORT] [--interval INTERVAL]
             [--user USER] [--version]

A visual stat tool for CrateDB clusters

optional arguments:
  -h, --help            show this help message and exit
  --host HOST, --crate-host HOST
                        CrateDB host to connect to
  --port PORT, --psql-port PORT
                        PSQL port of CrateDB host
  --interval INTERVAL, --refresh-interval INTERVAL
                        amount of time in seconds between each update
  --user USER, --db-user USER
                        database user
  --version             show program's version number and exit

By default cstat connects to localhost on port 5432 if not otherwise specified.

Keyboard Shortcuts

  • 0 ... toggle cluster info
  • 1 ... show utilization for CPU, process, memory, heap and disk
  • 2 ... show I/O statistics for network and disk
  • 3 ... show aggregated query duration based on jobs_log
  • x ... toggle nodes/aggregation view
  • f3 ... enable/disable job logging (this also sets the stats.jobs_log cluster setting)

Known Issues

  • Small terminal sizes will raise CanvasErrors because of content overflow.

Todo

  • [x] display disk usage
  • [x] display disk i/o
  • [x] display network i/o
  • [x] display node names in detail views
  • [x] use asyncio to perform http requests
  • [x] coloring of i/o stats
  • [ ] responsive i/o widget

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.