Giter VIP home page Giter VIP logo

angelia's Introduction

This is a tool to facilitate the development of nagios notification methods using many different protocols and delivery systems while using a single simple script that can deliver all messages.

Messages have recipients in the form:

    protocol://recipient

and each protocol gets handled by a different plugin.

At present there are just two plugins that serve as a introduction to the plugin system, see Angelia::Plugin::Xmpp and Angelia::Plugin::Clickatell.

When called from inside nagios a script - angelia-nagios-send - should be used it will assist in building up the message bodies by means of templates and the state provided by nagios, each protocol can have its own templates for host and service notifies, these are in files:

    templates/protocol-host.erb
    templates/protocol-service.erb

See the provided templates for samples

And you can use any of the NAGIOS_* variables that Nagios sets in the environment.

The nagios commands to send notifications via this tools are:

    define command{
            command_name host-notify-by-angelia
            command_line /usr/sbin/angelia-nagios-send -c /etc/angelia/angelia.cfg --host-notify -r $CONTACTEMAIL$
    }

    define command{
            command_name notify-by-angelia
            command_line /usr/sbin/angelia-nagios-send -c /etc/angelia/angelia.cfg --service-notify -r $CONTACTEMAIL$
    }

This will set all the nagios environment variables and the angelia notifier will use these with the templates mentioned earlier.

You can add the --icinga option if you are running under Icinga. This will set all the Icinga environment variables as well.

Normal messages can be send using angelia-send fro the command line or other monitoring systems, in this case you need to provide your own message body.

Sample calls to put messages on the spool are:

    $ angelia-nagios-send -c /etc/angelia/angelia.cfg --service-notify -r xmpp://[email protected]
    $ angelia-nagios-send -c /etc/angelia/angelia.cfg --icinga --service-notify -r clickatell://1234567890
    $ angelia-send -c /etc/angelia/angelia.cfg -r xmpp://[email protected] -m 'my message'

Included in the source are init scripts, daemon to run and poll the spool and also a RPM spec file to build it.

This code is released under the terms of the Apache version 2 license.

Contact R.I.Pienaar [email protected] / www.devco.net / @ripienaar

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.