a3rd / molniya

Automatically exported from code.google.com/p/molniya
GNU General Public License v2.0
0 stars 0 forks source link

Molniya is an instant messaging interface for Nagios. It relays alerts to Nagios contacts in a convenient way; it also allows you to ask for a status report, force checks, acknowledge faults, and more.

Copyright 2009-2010 Windermere Services Company. By Clayton Wheeler. Released under version 2 of the GPL; see LICENSE.

Home page: http://code.google.com/p/molniya/

Requirements:

Ruby 1.9 is preferable since the timeout facility in Ruby 1.8 is somewhat broken, this can cause Molniya to block indefinitely while attempting to reconnect to the XMPP server. It does still work with 1.8, though.

Molniya setup:

  1. Install the required gems listed above.
  2. Copy the sample configuration in example.yaml and fill in appropriate values for the various settings. See the comments in example.yaml for guidance.
  3. Configure your Nagios IM contacts with their IM addresses (XMPP JIDs) in the selected xmpp_field; I use address1.
  4. Launch the server: $ ./molniya -c config.yaml
  5. Connect to your XMPP server as the Molniya account and add your own IM account as a contact.

It should now be working; check by sending it the message 'status'. It should reply with a status report of current faults, or the message "All clear." If so, you're all set.

Nagios notification setup:

The included 'notify' utility is used as a Nagios notification command to send messages through Molniya via XMPP or SMTP. The file 'notify.cfg' contains the appropriate command definitions; edit the path as appropriate for your installation.

To actually use this notification method, configure Nagios contacts to use the 'molniya-notify' and 'molniya-host-notify' commands as service_notification_commands and host_notification_commands. See the comments in notify.cfg for an example and discussion.

Usage:

Send the message 'help' for a summary of commands.

Also, there are simple administrative roster-management commands:

admin list-roster: prints a list of IM contacts admin add : add JID as a contact with alias ALIAS admin remove : remove JID as a contact

Caveats:

This has been developed as an in-house application. It has only been used with one Nagios installation on Solaris. It should work in other environments but this is untested so far; let me know how it works out for you.

Refer to the Google Code site for more information on usage, outstanding bugs, development roadmap, etc.