Git Product home page Git Product logo

docker_check's Introduction

docker_check

Version 0.01
AUTHOR Benjamin Rizkowsky ([email protected]) 02/03/2014
https://github.com/benoahriz/docker_check

----------------------
Description
----------------------

A Ruby based nagios plugin to check the on the status of docker

Some references.
https://www.monitoring-plugins.org/doc/guidelines.html
http://www.kernel-panic.it/openbsd/nagios/nagios6.html
https://blog.centreon.com/good-practices-how-to-develop-monitoring-plugin-nagios/

----------------------
Installation
----------------------
git clone https://github.com/benoahriz/docker_check

----------------------
Command Line Arguments
----------------------
Example: ./docker_check.rb check [OPTIONS]

Commands
check

Options
    -v, --verbose                    verbose
    -V, --version                    version
    -h, --help                       help

----------------------
Requirements
----------------------
Intended to be used with nrpe since the script needs to be run locally on the docker host.
Check this tutorial.
https://www.digitalocean.com/community/articles/how-to-create-nagios-plugins-with-ruby-on-ubuntu-12-10

I tried to keep to using only standard ruby libraries.

require 'open3'
require 'optparse'
require 'logger'

----------------------
Todo
----------------------
add proper timeouts to each method.
add better formatting of 'docker info' to comply with nagios plugin standards
revamp or get rid of the docker_info() method in favor of the api

Using the docker vagrant machine from the tutorial I got different output than what is contained in the documentation.
http://docs.docker.io/en/latest/commandline/cli/#info
This method should deal with the difference by just not showing the other data.  A class and api for output or xml or json output would be much more desirable.
Example output from local docker.
--------------
Containers: 1
Images: 4
Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 6
-------------
Example from documentation on the website.
------------
$ sudo docker info
Containers: 292
Images: 194
Debug mode (server): false
Debug mode (client): false
Fds: 22
Goroutines: 67
LXC Version: 0.9.0
EventsListeners: 115
Kernel Version: 3.8.0-33-generic
------------

docker_check's People

Contributors

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