GithubHelp home page GithubHelp logo

savoirfairelinux / monitoring-tools Goto Github PK

View Code? Open in Web Editor NEW
28.0 17.0 13.0 8.9 MB

Collection of monitoring tools for Shinken, Nagios, etc.

Home Page: http://sfl-monitoring-tools.readthedocs.org/

Makefile 1.53% Shell 7.87% Python 81.33% Protocol Buffer 0.56% Perl 3.38% CSS 0.55% HTML 4.77%

monitoring-tools's Introduction

Monitoring Tools

Build Status Documentation Status

This repository contains plugins we use with Shinken, to check various services, and which are not implemented in the usual plugins packages.

Use

Installation

The best way to install these plugins is through your package manager. You can browse all the package repositories on Open Build Service project.

Debian

$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/sfl-monitoring:/monitoring-tools/Debian_7.0/ ./' > /etc/apt/sources.list.d/monitoring-tools.list"
$ wget http://download.opensuse.org/repositories/home:/sfl-monitoring:/monitoring-tools/Debian_7.0/Release.key
$ sudo apt-key add - < Release.key
$ sudo apt-get update
$ sudo apt-get install plugin-<the plugin you want>

Documentation

You can browse the online documentation at http://sfl-monitoring-tools.readthedocs.org/

Contribute

Create a plugin

To generate a plugin, you need to install jinja2, either by pip or via your package manager:

$ sudo pip install jinja2

or

$ sudo (apt-get|yum) install python-jinja2

Then

$ make new-plugin

To execute a plugin, you need to install the library shinkenplugins:

$ sudo pip install shinkenplugins

or for Debian and Ubuntu:

$ sudo apt-get install lib-shinkenplugins

Update the Debian packaging of a plugin/pack

After modifying files under debian/, you can add an entry in the changelog by doing:

$ author=$(git log -n 1 --format=%aN)
$ export DEBFULLNAME=$author
$ email=$(git log -n 1 --format=%ae)
$ export DEBEMAIL=$email
$ msg=$(git log -n 1 --format=%s)
$ version=$(date +%Y.%m.%e.%H.%M)
$ dch $msg --no-auto-nmu --newversion $version

Build the Debian source packages

make packages

This will build the .orig.tar.gz, .debian.tar.gz, .dsc, and .changes files.

Push the debian source packages to Open Build Service

make obs

This will checkout the OBS project and commit the new debian source package files. You must be a maintainer on the OBS project to successfully run this command. Travis has the permissions to do it.

monitoring-tools's People

Contributors

titilambert avatar matthieucan avatar freddrickk avatar aviau avatar ppepos avatar fpeyre avatar gst avatar seb-solon avatar arthtux avatar vfournier11 avatar

Stargazers

nask0 avatar  avatar Aamer Alduais avatar Steve Butler avatar Alexander avatar Soyez Cloud avatar Juri Grabowski avatar Daniel H avatar Jonathan Barratt avatar Romuald Bruno Aquinas avatar Aurélien Tamisier avatar Francesco Camisa avatar Lester Cheung avatar  avatar Devon Hakel-Kinko avatar  avatar Salton Massally avatar Tobias Goecke (Göcke) avatar Alexandre Chaussier avatar Nikolaus Schlemm avatar Kai Qiang Wu avatar  avatar Minh-Triet Pham Tran avatar haomingz avatar Sviatoslav Sydorenko (Святослав Сидоренко) avatar Pedro Jiménez Solís avatar  avatar  avatar

Watchers

Maxime Dupuis avatar Simon Piette avatar Minh-Triet Pham Tran avatar James Cloos avatar  avatar haomingz avatar Alexandre Chaussier avatar Francesco Camisa avatar R. Munden avatar Juri Grabowski avatar  avatar  avatar  avatar  avatar  avatar David Barbeau avatar  avatar

monitoring-tools's Issues

Endpoint issue with some os packs

  • linux-cinder: Arguments error: the argument cinder_endpoint must be present
  • linux-nova: Arguments error: the argument nova_endpoint must be present

The following custom fields are configured on my host: _OS_AUTH_URL, _OS_GLANCE_URL, _OS_CINDER_URL, _NOVA_URL, _OS_USERNAME, _OS_PASSWORD, _OS_TENANT_NAME.

Thanks.

Undocumented packs fields

The following custom fields are not properly declared in templates.cfg:

  • linux-cinder: OS_CINDER_URL
  • linux-nova: NOVA_URL
    Thanks!

TODO

  • README in doc/

  • clean tools/

  • CI: integrate travis-ci

    • .travis.yml and tests runner
    • link to travis-ci
    • fix failed tests in various plugins
      • plugin-check_mem
      • plugin-check_poller2livestatus (use socket instead of os.system)
      • plugin-check_printer_hp_2600n (lxml is not installed, though it is in requirements)
      • plugin-check_rancid (pysvn is not installed, though it is in requirements)
      • plugin-check_samba
      • plugin-check_spa2102 (lxml is not installed, though it is in requirements)
      • plugin-check_tripplite_ups
      • plugin-check_libvirt_stats (travis-ci provides Ubuntu 12.04, in which libvirt-dev is too old)
      • plugin-check_linux_traffic
      • travis: dont push to obs if it's a pull request (even from another branch)
    • add badges
  • packaging

    • .deb
    • .rpm
    • tarball
  • plugins library

    • write documentation for all p[lugins (hint: use --help)
    • base classes
    • update plugins
    • remove jenkins .sh's
  • document how-to-contribute

  • static analysis

    • add lintian run in travis
  • move check-foo/doc/plugin-check_foo.rst to check-foo/check_foo.rst

  • travis, readthedocs and obs only changed plugins

  • speed-up pip install's with wheel, notably for lxml: https://pip.pypa.io/en/latest/reference/pip_wheel.html#examples

    http://clarete.li/curdling/

check-emergency-rooms-quebec failed test

https://travis-ci.org/savoirfairelinux/monitoring-tools/builds/56729697

to be investigated..

======================================================================
FAIL: test_critical_output (test_check_emergency_rooms_quebec.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/savoirfairelinux/monitoring-tools/plugins/check-emergency-rooms-quebec/tests/test_check_emergency_rooms_quebec.py", line 55, in test_critical_output
    self.execute(Plugin, args, 2, 'CRITICAL - [0-9]*%')
  File "/home/travis/build/savoirfairelinux/monitoring-tools/plugins/check-emergency-rooms-quebec/env/local/lib/python2.7/site-packages/shinkenplugins/test.py", line 68, in execute
    self.assertRegexpMatches(stdout_output, stdout_pattern)
AssertionError: Regexp didn't match: 'CRITICAL - [0-9]*%' not found in u'CRITICAL: 128%|functional_stretchers=585;;;0; occupied_stretchers=752;;;0; occupation=128;-1.0;-1.0;0;100'
======================================================================
FAIL: test_no_args (test_check_emergency_rooms_quebec.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/savoirfairelinux/monitoring-tools/plugins/check-emergency-rooms-quebec/tests/test_check_emergency_rooms_quebec.py", line 47, in test_no_args
    self.execute(Plugin, [], 3, 'Arguments error: argument url is mandatory')
  File "/home/travis/build/savoirfairelinux/monitoring-tools/plugins/check-emergency-rooms-quebec/env/local/lib/python2.7/site-packages/shinkenplugins/test.py", line 68, in execute
    self.assertRegexpMatches(stdout_output, stdout_pattern)
AssertionError: Regexp didn't match: 'Arguments error: argument url is mandatory' not found in ''

Set correctly version for each plugin

I would like that for each plugin its version is available within its package, that is :

from shinkenplugins.plugins.xxx import __version__
# or 
from shinkenplugins.plugins.xxx import VERSION

should give the actual plugin xxx's version (as string), like "1.2" .

actually only very few plugins have that.

See for example: https://github.com/savoirfairelinux/monitoring-tools/blob/master/plugins/check-reseaucontactcom/setup.py#L35

some refs:

https://www.python.org/dev/peps/pep-0008/#version-bookkeeping
http://legacy.python.org/dev/peps/pep-0396/#specification
https://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/
etc..

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.