Code Monkey home page Code Monkey logo

nagios's Introduction

====================================
Nagios Plugin Python Module (and some plugins)

Author: Ryan C. Catherman
====================================

1. Reasons for writing
2. Getting started
3. Deploying

========================
Reasons for writing
========================
I had deployed nagios at home to send me emails when my work VPN went down or when I
had forgotten to turn on critical VMs. I started looking at the docs on how to write
plugins and figured it would be fun to spend a day or two writing some helpers and tests
to be able to more easily inject data into the system.

There may already be existing python libraries for nagios, but I wanted to learn
by doing so I wrote this.

I hope you find it useful.

======================
Getting started
======================
If you intend to just use any of the plugins provided (have I written any yet?),
jump to the "Deploying" section.

If you intend to dev new ones, or make improvements, these points will be of interest:

 - At the root, you'll find a Makefile with a trivial "make test" rule. This is your friend.
 - If you are writing an actual plugin of value, refer to the "check_random" plugin as a starting point

======================
Deploying
======================
Since the implementation is pretty trivial, for now I find it sufficient to just create
a git clone on my target system and then create symbolic links as needed. If this project
matures, then a more proper installation may be called-for.

# Creating a symlink is as simple as:
$ sudo ln -s ~/nagios.git/plugins/py/src/check_random /usr/lib/nagios/plugins/

# And then create a command and service definition as you would anything else:
define command {
    command_name    check-random
    command_line    /usr/lib/nagios/plugins/check_random --min 0 --max 100 -w 0:90 -c 0:95
}

define service {
    hosts       localhost
    service_description  random
    check_command check-random
    use generic-service
    notification_interval 0
}

nagios's People

Contributors

cheezypoofs avatar

Watchers

 avatar

nagios's Issues

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.