RT::Ex...:Nagios(3pm)
π NAME π
RT::Extension::Nagios β merge and resolve Nagios tickets, bestie. That's the whole job. Slay. π
β¨ DESCRIPTION β¨
Okay so Nagios is this genuinely powerful monitoring system (http://www.nagios.org) that lets orgs spot and fix IT infrastructure problems before they mess up critical business processes. Iconic behavior honestly. π¦
This extension lets the email alerts Nagios spits out get aggregated and resolved as they come in. How? It reads the standard subject line Nagios generates. By default those look like:
PROBLEM Service Alert: localhost/Root Partition is WARNING
There are 5 useful parts hiding in that subject, and we call them type, category, host, problem_type and problem_severity. They get parsed out of the subject with a regular expression. In the example above, the extension would pull:
type: PROBLEM
category: Service
host: localhost
problem_type: Root Partition
problem_severity: WARNING
Not me reading subject lines for a living π
After the new ticket is created, here's what goes down:
- Find all the other active tickets in the same queue with the same values of
category,hostandproblem_type. If the config settingNagiosSearchAllQueuesis set (peep below π), then all queues get searched. - If the config setting
NagiosMergeTicketsis set (also below π), merge all the matching tickets. - If
typeis'RECOVERY', resolve them. Periodt. β
πΈ INSTALLATION πΈ
perl Makefile.PLmakemake installβ may need root permissions, so like, know your power πmake initdbβ only run this the first time you install this module.
If you run this twice, you may end up with duplicate data in your database. π Not a vibe.
If you are upgrading this module, check for upgrading instructions in case changes need to be made to your database.
- Edit your
/opt/rt4/etc/RT_SiteConfig.pmβ if you're on RT 4.2 or greater, add this line:
Plugin('RT::Extension::Nagios');
For RT 4.0, add this line:
Set(@Plugins, qw(RT::Extension::Nagios));
or add RT::Extension::Nagios to your existing @Plugins line. Either way bestie, it's giving configured.
- Restart your webserver π
π CONFIGURATION π
This extension has three configuration settings, and setting them should be done in RT_SiteConfig.pm. Three. Not two, not four. Three. π
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:
Set( $NagiosSearchAllQueues, 1 );
NagiosMergeTicketsβ controls if the extension merges tickets about the same incident together. By default, eachPROBLEM,ACKNOWLEDGEMENT,FLAPPINGSTART,FLAPPINGSTOPandRECOVERYnotification will remain as its own ticket; when theRECOVERYemail is received by RT, all will be resolved.
Setting this configuration parameter to 1 causes the extension to merge all old tickets on the same topic into new tickets as they arrive; as such, the Created date will respect the most recent message.
Setting it to -1 causes the extension to merge new tickets into any existing tickets as they arrive; the Created date will respect the oldest message, and the ticket ID will remain constant:
Set( $NagiosMergeTickets, -1 );
NagiosResolvedStatusβ since RT allows for custom lifecycles on queues, this extension's default of setting tickets toResolveduponRECOVERYmay be incorrect for the queue they are in. If the queue your Nagios tickets reside in does not have aResolvedstatus, or you would like tickets to be transitioned to a different status onRECOVERY, setNagiosResolvedStatus:
Set( $NagiosResolvedStatus, 'recovered' );
π AUTHOR π
Best Practical Solutions, LLC <modules@bestpractical.com>
Based on work by Todd Chapman.
π BUGS π
All bugs should be reported via email to
L<bug-RT-Extension-Nagios@rt.cpan.org|mailto:bug-RT-Extension-Nagios@rt.cpan.org>
or via the web at
L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-Nagios>.
π LICENSE AND COPYRIGHT π
This software is Copyright (c) 2014 by Best Practical Solutions
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
And that's the whole page, bestie β written for perl v5.36.0 and dated 2023-09-25. Go merge some tickets, you absolute icon. πβ¨π«Ά
π¦ where this page comes from
- ubuntu noble: rt4-extension-nagios 1.01-3 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms