Git Product home page Git Product logo

machine-check's Introduction

machine-check

Run checks against a Linux machine, export as Prometheus metrics

Usage

nix build
./result/bin/machine-check
# dry run - don't try to write to /run/metrics, just dump to stdout
./result/bin/machine-check dry-run

Designed to be run periodically via cron, by default machine-check creates /run/metrics/machine-check.prom containing results of all checks.

Configuration

It is possible to configure certain checks like DNS check by providing a configuration file via environment variable:

MCCFG=./sample.config ./result/bin/machine-check

Check out config.sample in this repository for a list of possible options.

Output sample

# HELP zpool_status_errors pool errors
# TYPE zpool_status_errors gauge
zpool_status_errors{name="tank"} 0.0
# HELP zpool_status_health pool health
# TYPE zpool_status_health gauge
zpool_status_health{name="tank"} 0.0
# HELP zpool_status_parse_success parsing successful
# TYPE zpool_status_parse_success gauge
zpool_status_parse_success 0.0
# HELP zpool_status_status_reported pool reports status if 1
# TYPE zpool_status_status_reported gauge
zpool_status_status_reported{name="tank"} 1.0
# HELP zpool_status_success exitcode
# TYPE zpool_status_success gauge
zpool_status_success 0.0
# HELP zpool_list_success exitcode
# TYPE zpool_list_success gauge
zpool_list_success 1.0

Current checks:

  • zpool list (capacity, health)
  • zpool status (health, status, erros)
  • birdc(6) show protocols
  • dns

Future checks:

  • ping

machine-check's People

Contributors

sorki avatar

Watchers

 avatar James Cloos avatar Pavel Šimerda avatar Pavel Snajdr avatar Tomas Srnka avatar Jakub Skokan avatar Petr Krčmář avatar  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.