RT::Extension::Nagios - Merge and resolve Nagios tickets


RT-Extension-Nagios documentation Contained in the RT-Extension-Nagios distribution.

Index


Code Index:

NAME

Top

RT::Extension::Nagios - Merge and resolve Nagios tickets

DESCRIPTION

Top

Based on http://wiki.bestpractical.com/view/AutoCloseOnNagiosRecoveryMessages, thanks, Todd Chapman!

Nagios( http://www.nagios.org ) is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.

Once you create Nagios tickets by piping Nagio's email notifications, this extension helps you merge and resolve them.

We identify email by its subject, so please keep it as the default one or alike, i.e. subject should pass the regex:

qr{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i

e.g. "PROBLEM Service Alert: localhost/Root Partition is WARNING":

There are 5 useful parts in subject( we call them type, category, host, problem_type and problem_severity ):

PROBLEM, Service, localhost, Root Partition and WARNING

( Currently, we don't make use of problem_severity actually )

After the new ticket is created, the following is done:

1. find all the other active tickets in the same queue( unless RT->Config->Get('NagiosSearchAllQueues') is true, which will cause to search all the queues ) with the same values of $category, $host and $problem_type.

2. if RT->Config->Get('NagiosMergeTickets') is true, merge all of them. if $type is 'RECOVERY', resolve the merged ticket.

if RT->Config->Get('NagiosMergeTickets') is false and $type is 'RECOVERY', resolve all them.

NOTE:

config items like NagiosSearchAllQueues and NagiosMergeTickets can be set in etc/RT_SiteConfig.pm like this:

    Set($NagiosSearchAllQueues, 1); # true
    Set($NagiosMergeTickets, 0); # false, no merge will be done
    Set($NagiosMergeTickets, 1); # merged to the newest ticket.
    Set($NagiosMergeTickets, -1); # merged to the oldest ticket.

by default, tickets will be resolved with status resolved, you can customize this via config item NagiosResolvedStatus, e.g.

    Set($NagiosResolvedStatus, "recovered");

AUTHOR

Top

sunnavy <sunnavy@bestpractical.com>

LICENCE AND COPYRIGHT

Top


RT-Extension-Nagios documentation Contained in the RT-Extension-Nagios distribution.
use warnings;
use strict;

package RT::Extension::Nagios;

our $VERSION = '0.06';

1;