.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RT::Extension::Nagios 3pm" .TH RT::Extension::Nagios 3pm "2021-02-27" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" RT::Extension::Nagios \- Merge and resolve Nagios tickets .SH "DESCRIPTION" .IX Header "DESCRIPTION" Nagios is a powerful monitoring system that enables organizations to identify and resolve \s-1IT\s0 infrastructure problems before they affect critical business processes. .PP This extension allows email alerts generated by Nagios to be aggregated and resolved as it generates them. It does this by examining the standard subject line that Nagios generates; by default, these take the form: .PP .Vb 1 \& PROBLEM Service Alert: localhost/Root Partition is WARNING .Ve .PP There are 5 useful parts in subject; we call them \f(CW\*(C`type\*(C'\fR, \f(CW\*(C`category\*(C'\fR, \&\f(CW\*(C`host\*(C'\fR, \f(CW\*(C`problem_type\*(C'\fR and \f(CW\*(C`problem_severity\*(C'\fR. These are parsed from the subject via a regular expression; in the above example, the extension would extract: .PP .Vb 5 \& type: PROBLEM \& category: Service \& host: localhost \& problem_type: Root Partition \& problem_severity: WARNING .Ve .PP After the new ticket is created, the following is done: .IP "1." 4 Find all the other active tickets in the same queue with the same values of \f(CW\*(C`category\*(C'\fR, \f(CW\*(C`host\*(C'\fR and \f(CW\*(C`problem_type\*(C'\fR. If the configuration setting \f(CW\*(C`NagiosSearchAllQueues\*(C'\fR is set (see below), all queues are searched. .IP "2." 4 If the configuration setting \f(CW\*(C`NagiosMergeTickets\*(C'\fR is set (see below), merge all matching tickets. .IP "3." 4 If \f(CW\*(C`type\*(C'\fR is '\s-1RECOVERY\s0', resolve them. .SH "INSTALLATION" .IX Header "INSTALLATION" .ie n .IP """perl Makefile.PL""" 4 .el .IP "\f(CWperl Makefile.PL\fR" 4 .IX Item "perl Makefile.PL" .PD 0 .ie n .IP """make""" 4 .el .IP "\f(CWmake\fR" 4 .IX Item "make" .ie n .IP """make install""" 4 .el .IP "\f(CWmake install\fR" 4 .IX Item "make install" .PD May need root permissions .ie n .IP """make initdb""" 4 .el .IP "\f(CWmake initdb\fR" 4 .IX Item "make initdb" Only run this the first time you install this module. .Sp If you run this twice, you may end up with duplicate data in your database. .Sp If you are upgrading this module, check for upgrading instructions in case changes need to be made to your database. .IP "Create or edit a file in \fI/etc/request\-tracker5/RT_SiteConfig.d\fR" 4 .IX Item "Create or edit a file in /etc/request-tracker5/RT_SiteConfig.d" If you are using \s-1RT 4.2\s0 or greater, add this line: .Sp .Vb 1 \& Plugin(\*(AqRT::Extension::Nagios\*(Aq); .Ve .Sp For \s-1RT 4.0,\s0 add this line: .Sp .Vb 1 \& Set(@Plugins, qw(RT::Extension::Nagios)); .Ve .Sp or add \f(CW\*(C`RT::Extension::Nagios\*(C'\fR to your existing \f(CW@Plugins\fR line. .IP "Restart your webserver" 4 .IX Item "Restart your webserver" .SH "CONFIGURATION" .IX Header "CONFIGURATION" This extension has three configuration settings; setting them should be done in \f(CW\*(C`RT_SiteConfig.pm\*(C'\fR. .ie n .IP """NagiosSearchAllQueues""" 4 .el .IP "\f(CWNagiosSearchAllQueues\fR" 4 .IX Item "NagiosSearchAllQueues" If set, this causes step 1, above, to search for matching Nagios tickets in an queue. In most configurations, Nagios notifications will arrive in one queue, and remain there. If your workflow involves triaging Nagios notifications from there into other queues, you will want to set: .Sp .Vb 1 \& Set( $NagiosSearchAllQueues, 1 ); .Ve .ie n .IP """NagiosMergeTickets""" 4 .el .IP "\f(CWNagiosMergeTickets\fR" 4 .IX Item "NagiosMergeTickets" Controls if the extensions merges tickets about the same incident together. By default, each \f(CW\*(C`PROBLEM\*(C'\fR, \f(CW\*(C`ACKNOWLEDGEMENT\*(C'\fR, \&\f(CW\*(C`FLAPPINGSTART\*(C'\fR, \f(CW\*(C`FLAPPINGSTOP\*(C'\fR and \f(CW\*(C`RECOVERY\*(C'\fR notification will remain as its own ticket; when the \f(CW\*(C`RECOVERY\*(C'\fR email is received by \s-1RT,\s0 all will be resolved. .Sp Setting this configuration parameter to \f(CW1\fR causes the extension to merge all old tickets on the same topic into new tickets as they arrive; as such, the \f(CW\*(C`Created\*(C'\fR date will respect the most recent message. .Sp Setting it to \f(CW\*(C`\-1\*(C'\fR causes the extension to merge new tickets into any existing tickets as they arrive; the \f(CW\*(C`Created\*(C'\fR date will respect the oldest message, and the ticket \s-1ID\s0 will remain constant: .Sp .Vb 1 \& Set( $NagiosMergeTickets, \-1 ); .Ve .ie n .IP """NagiosResolvedStatus""" 4 .el .IP "\f(CWNagiosResolvedStatus\fR" 4 .IX Item "NagiosResolvedStatus" Since \s-1RT\s0 allows for custom lifecycles on queues, this extension's default of setting tickets to \f(CW\*(C`Resolved\*(C'\fR upon \f(CW\*(C`RECOVERY\*(C'\fR may be incorrect for the queue they are in. If the queue your Nagios tickets reside in does not have a \f(CW\*(C`Resolved\*(C'\fR status, or you would like tickets to be transitioned to a different status on \f(CW\*(C`RECOVERY\*(C'\fR, set \&\f(CW\*(C`NagiosResolvedStatus\*(C'\fR: .Sp .Vb 1 \& Set( $NagiosResolvedStatus, \*(Aqrecovered\*(Aq ); .Ve .SH "AUTHOR" .IX Header "AUTHOR" Best Practical Solutions, \s-1LLC\s0 .PP Based on work by Todd Chapman. .SH "BUGS" .IX Header "BUGS" All bugs should be reported via email to .PP .Vb 1 \& L .Ve .PP or via the web at .PP .Vb 1 \& L. .Ve .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" This software is Copyright (c) 2014 by Best Practical Solutions .PP This is free software, licensed under: .PP .Vb 1 \& The GNU General Public License, Version 2, June 1991 .Ve