RT::Ex...:Nagios(3pm)

πŸ“¦ version 1.01, in debian bookworm, ubuntu jammy

πŸ’– RT::Extension::Nagios πŸ’–

okay bestie, welcome to RT::Ex...:Nagios(3pm), the manual page you're about to become obsessed with 🫢


✨ NAME ✨

RT::Extension::Nagios β€” merge and resolve Nagios tickets, no cap 🎟️✨


🌸 DESCRIPTION 🌸

So. Nagios <http://www.nagios.org> is a powerful monitoring system that lets organizations spot and fix IT infrastructure problems before they mess with critical business processes. iconic behaviour, honestly πŸ’…

This extension lets the email alerts that Nagios generates be aggregated and resolved as they come in. The way it does that? It examines the standard subject line Nagios generates. By default those look like:

PROBLEM Service Alert: localhost/Root Partition is WARNING

There are 5 useful parts in that subject, and we call them "type", "category", "host", "problem_type" and "problem_severity". They get parsed out of the subject via a regular expression, and in the example above the extension would extract:

type:             PROBLEM
category:         Service
host:             localhost
problem_type:     Root Partition
problem_severity: WARNING

Once the new ticket is created, here's the whole lil routine it runs:

  1. Find all the other active tickets in the same queue with the same values of "category", "host" and "problem_type". If the configuration setting "NagiosSearchAllQueues" is set (see below), then all queues are searched, not just the one πŸ‘€
  2. If the configuration setting "NagiosMergeTickets" is set (see below), merge all matching tickets.
  3. If "type" is 'RECOVERY', resolve them. bye bestie πŸ‘‹

πŸŽ€ INSTALLATION πŸŽ€

  • perl Makefile.PL
  • make
  • make install
    • May need root permissions πŸ”
  • make initdb
    • Only run this the first time you install this module. fr fr, once only.
    • > If you run this twice, you may end up with duplicate data in your database. πŸ’€ not the duplicate data
    • 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 are using 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. whichever, we don't gatekeep 🫢
  • Restart your webserver πŸ”„

🌈 CONFIGURATION 🌈

This extension has three configuration settings, and setting them should be done in RT_SiteConfig.pm. three settings, three chances to slay πŸ’…

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 extensions merges tickets about the same incident together. By default, each "PROBLEM", "ACKNOWLEDGEMENT", "FLAPPINGSTART", "FLAPPINGSTOP" and "RECOVERY" notification will remain as its own ticket; when the "RECOVERY" email 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. ✨ fresh timestamps ✨

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 to "Resolved" upon "RECOVERY" may be incorrect for the queue they are in. If the queue your Nagios tickets reside in does not have a "Resolved" status, or you would like tickets to be transitioned to a different status on "RECOVERY", set NagiosResolvedStatus:

Set( $NagiosResolvedStatus, 'recovered' );

πŸ‘‘ AUTHOR πŸ‘‘

Best Practical Solutions, LLC <modules@bestpractical.com>

Based on work by Todd Chapman. shoutout 🫑


πŸ’€ 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>.

(if u find a bug, that's not a vibe check failure on ur part, just tell them πŸ›)


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, u ate that πŸ“ this was perl v5.32.0, dated 2021-01-02, and it's the manual for RT::Ex...:Nagios(3pm) β€” go merge some tickets, main character energy only πŸ‘‘βœ¨

πŸ“¦ where this page comes from