Code Monkey home page Code Monkey logo

chdig's Introduction

chdig

Dig into ClickHouse with TUI interface.

Motivation

The idea is came from everyday digging into various ClickHouse issues.

ClickHouse has a approximately universe of introspection tools, and it is easy to forget some of them. At first I came with some slides and a picture (to attract your attention) by analogy to what Brendan Gregg did for Linux:

Know Your ClickHouse

Note, the picture and the presentation had been made in the beginning of 2022, so it may not include some new introspection tools.

But this requires you to dig into lots of places, and even though during this process you will learn a lot, it does not solves the problem of forgetfulness. So I came up with this simple TUI interface that tries to make this process simpler.

chdig can be used not only to debug some problems, but also just as a regular introspection, like top for Linux.

Demo

asciicast

Features

  • top like interface (or csysdig to be more precise)
  • Flamegraphs (CPU/Real/Memory)
  • Query logs
  • Cluster support (--cluster)

Plugins

  • Query view (system.processes)
  • Slow query log (system.query_log)
  • Last queries (system.query_log)
  • Processors (system.processors_profile_log)
  • Views (system.query_views_log)
  • Merges view (system.merges)
  • Mutations view (system.mutations)
  • Replicas (system.replicas)
  • Replication queue view (system.replication_queue)
  • Fetches (system.replicated_fetches)
  • Backups (system.backups)
  • Errors (system.errors)

And there is a huge bunch of TODOs (right now it is too huge to include it here).

Note, this it is in a pre-alpha stage, so everything can be changed (keyboard shortcuts, views, color schema and of course features)

Requirements

If something does not work, like you have too old version of ClickHouse, consider upgrading.

Later some backward compatiblity will be added as well.

Installation

Prerequisites:

make packages

For now, only deb packages are available.

But we are using nfpm, so any supported package, archlinux, deb, rpm, tar, you name it, can be supported):

Third party libraries

Notes

Since Rust is a new language to me, the code can be far from ideal.

chdig's People

Contributors

azat 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.