]po[ ITSM Nagios Integration


 


Nagios  is an enterprise-class systems monitoring solutions for hosts, services, and networks released under an Open Source license. Together the two systems cover the entire process chain of ITIL complient IT Services Management:

Creating a Ticket

  • Incident detection - Nagios detects a malfunction
  • Nagios integration - ]po[ receives the Nagios email and creates an incident ticket for the specified configuration item.

Working with the Ticket

  • Incident management - ]po[ starts a workflow for the ticket, depending on the ticket type.
    The workflow includes information about where to queue the ticket and whether a customer sign-off is necessary or not.
  • Problem management - IT staff can "escalates" the incident by creating a problem ticket, which in turn starts is own workflow and queue assignations.
  • Configuration management - all tickets are associated with the affected configuration item, allowing users to track the incident history per CI. ]po[ can parse the Nagios configuration files (nagios.conf and the contents of the /objects/ folder in Nagios 2.0) in order to synchronize the Nagios CIs with the ]po[ CIs. Future versions of ]po[ will also be able to create Nagios configuration files.
  • Knowledge management - all comments and other text related to tickets are stored in the ]po[ full-text search engine and accessible for users with access rights to the specific ticket.

Closing the Ticket

  • A recovery mail from Nagios automatically closes the ticket.
  • Alternatively, the CVS integration may close the ticket if a CVS or SVN commit includes a comment of type "fixed #123".

Integration With Other Modules

  • Timesheet management - ]po[ tickets are linked with the timesheet management, so that all participants can log hours against tickets
  • Financial management - time and material spent on tickets are summed up a the SLA level and allow the organization to bill customers the provided services
  • Release management - changes in CVS or SVN are automatically re

Nagios Integration Overview

The Nagios integration is based on the following components:

  • A locally running Postfix instance receives emails (possibly imported via fetchmail) and delivers them to ~/Maildir/new/
  • An OpenACS "acs-mail-lite" process scans ~/Maildir every few minutes
  • ]po['s "intranet-nagios" package receives callbacks from acs-mail-lite, parses the Nagios subject line and extracts extract all important variables (host, service, status etc.):
  • ]po[ check is there is already an open ticket for the specified host/service and add the current message to the existing ticket
  • If necessary, ]po[ generates a new host and/or service as "Configuration Items" in the configuration database.
  • Alternatively, ]po[ can also parse the Nagios configuration files and import all hosts and services into the ConfDB.

Nagios Configuration Setup

Please follow these steps in order to setup/debug your Nagios integration.

  1. Nagios detects an incident and sends an email:
    Please configure your Nagios "contacts.cfg" to include "projop@localhost" for notifications (we assume that ]project-open[ is running as user "projop" at the same computer where Nagios is running).
    To verify: Please check /var/log/mail or /var/log/maillog to see if notification emails are sent out correctly.

  2. Please configure Postfix SMTP agent to receive emailfon the computer running ]project-open[:
    Please configure the SMTP agent on the computer running ]po[ to deliver local mails in "Maildir" format. Please note that not all SMTP agents can deliver in "Maildir" format (Sendmail is a prominente example). In this case, please change to Postfix or QMail. You may have to use a mailbox and "fetchmail" if Nagios and ]po[ are running on different computers.
    To verify: Please check in /web/projop/Maildir/new/ that every Nagios mail creates a new file.

  3. Configure "acs-mail-lite" to parse Nagios notifications:
    "acs-mail-lite" is an OpenACS/]po[ package that is capable of handing incoming mail and to distribute mail events to the "intranet-nagios" package. Please go to Admin -> Parameters and configure the "BounceMailDir" parameter of acs-mail-lite to match your Maildir ("/web/projop/Maildir"). Then go to Admin -> Interactive Shell and execute the command "acs_mail_lite::load_mails".
    To verify: Please check log file for debugging output: "tail -f ~/log/error.log | grep 'load_mail_dir'". You should see several lines, the last one of them like this:
    [<Date>][<ID>][-conn0-] Notice: acs_mail_lite::load_mail_dir: Calling: 'im_nagios_acs_mail_lite_callback -to projop@localhost -from nagios@projop.project-open.net -subject {...} -body {...}

    If you don't see this last line: Please make sure you have installed intranet-nagios >= 3.4.0.7.5 and the latest version of acs-mail-lite.

  4. Check that intranet-nagios parses the Nagios alert:
    The procedure im_nagios_process_alert in ~/packages/intranet-nagios/tcl/intranet-nagios.procs.tcl  is responsible for parsing the Nagios messages and creating helpdesk tickets and configuration items. It is unlikely to cause trouble if the Nagios mails have been received correctly by acs-mail-lite.
    To verify: Please go to Helpdesk to check for new tickets, and go to Conf Items to check if a new server has been created plus a sub-item representing the Nagios service.

References

Maturity 

  • Active and Stable

Related Modules


Package Documentation

Procedure Files

tcl/intranet-nagios-callback-procs.tcl       Library for Nagios interface callback implementations 
tcl/intranet-nagios-procs.tcl        

Procedures

callback::acs_mail_lite::incoming_email::impl::nagios       Implementation of the interface acs_mail_lite::incoming_email for Nagios events. 
im_nagios_acs_mail_lite_callback       This procedure is called from the callback acs_mail_lite::load_mails every time there is an email with a suitable Nagios header. 
im_nagios_conf_item_type_generic_router        
im_nagios_conf_item_type_http_service        
im_nagios_conf_item_type_linux_server        
im_nagios_create_confdb       Creates configuration items from a Nagios configuration 
im_nagios_display_config       Creates a UL-LI list structure from a nagios config. 
im_nagios_find_open_ticket       Checks whether there is a ticket open for the given host+service and returns 0 otherwise. 
im_nagios_get_host_by_name       Returns the conf_id of the host with the given name 
im_nagios_get_service_by_name       Returns the conf_id of the service with the given name 
im_nagios_get_type_id_from_host_info       Tries to determine a suitable "Intranet Conf Item Type" for the given Nagios host. 
im_nagios_parse_config_file       The Nagios parser. 
im_nagios_process_alert       This procedure is called from the callback acs_mail_lite::incoming_email every time there is an email with a suitable Nagios header. 
im_nagios_read_config       Read multiple configuration files and return a "hosts" hash structure. 

SQL Files

sql/postgresql/intranet-nagios-create.sql        
sql/postgresql/intranet-nagios-drop.sql        

Content Pages

www/
      import-nagios-confitems.tcl Parses the Nagios configuration file and creates ConfItems in the ]po[ ConfDB
      index.adp
      index.tcl Main page for Nagios integration
 

 

  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

E-08907 Hospitalet de Llobregat (Barcelona)

 Tel Europe: +34 932 202 088
 Tel US: +1 415 429 5995
 Mail: info@project-open.com