Git Product home page Git Product logo

dbm's Introduction

dbm - the database monitoring tool

Ever had a problem to Identify your current replica master? Or just wanting to grep some metrics or uptimes about your database? This small tool might help you!

Usage

Configuration

dbm reads in a yaml configuration that can be stored on multiple paths (/etc/dbm/config.yaml, ./config.yaml, $HOME/.dbm/config.yaml) The configuration is used for all commands.

logfile: test.log # your logfile (if not set none will be created)
debug: false # enable this for debug logs 
test_timeout: 5 # maximum runtime of a test until it will be canceled
test_interval: 30 # interval when to run the next test
databases: # your database configurations
  - host: localhost
    port: 5432
    username: postgres
    password: postgres # <- I know this is not nice yet, I will try to provide another way for configuration soon
    database: postgres
    use_ssl: true
    SSLCertPath: /some/path
    SSLKeyPath: /some/path
    SSLRootCertPath: /some/path
    connection_timeout: 5
  - host: localhost
    port: 5433
    username: postgres
    password: postgres
    database: postgres
    connection_timeout: 5

Locally

Setup

There is an easy way to setup your databases to support this tool. As it does some read/write testing you need to have a table created. Right now the table is hardcoded as test. In order to set it up, just configure your databases and execute dbm setup

Local

If you want to make an initial test locally, please use dbm local. This will just run the database tester and provide you with information about their behaving.

Serve

This command serves the results of the tester as json.

{
    "results":  {
        "localhost:5432/postgres":  {
            "database":"localhost:5432/postgres",
            "connectable":true,
            "connection_time":81034,
            "writable":false,
            "write_time":0,
            "readable":false,
            "read_time":0,
            "timestamp":"2023-12-02T23:38:57.552428198+01:00"
        },
        "localhost:5433/postgres":  {
            "database":"localhost:5433/postgres",
            "connectable":true,
            "connection_time":248551,
            "writable":false,
            "write_time":0,
            "readable":false,
            "read_time":0,
            "timestamp":"2023-12-02T23:38:57.552428752+01:00"
        }
    }
}

dbm's People

Contributors

fbufler avatar

Watchers

 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.