Reporting

Nagios Email Reporter

Description:

This perl script can request an overnight, daily, weekly or monthly report from the Nagios server using the standard CGIs, it then parses the output (formats CSS for Web and Lotus Notes), then emails as an Inline HTML email to a supplied email address.

Current Version

Last Release Date

June 8, 2009

Compatible With


Project Files
Project Notes
This was written to accomplish a task for the company I am working for. We use Lotus Notes 6 for Email, and the CSS code needed to be modified. This is supplied as-is, so some knoweledge of Perl may be required. There are some values in the script such as the SMTP server and Nagios URL that need to be edited before it will run properly. The reports are defined as: Overnight; from 17h the previous WORKING day to 9am of the current day Daily; from 7am of the previous WORKING day to 7am of the current day Weekly; from 9am 7 days before to 9am of the current day. Monthly; from 00:00h of the 1st of the month to 00:00h of the 1st day of the current month These values can easily be modified by changing the values in the perl script for each report. All of these scripts are protected by the GNU GPLv2 This script requires Perl 5 and Bundle::LWP
Reviews (8) Add a Review
Not getting emails
by shivrajhada2@gmail.com, January 31, 2020

Hi, I am not getting email on my inbox or spam, Below is the output of script, [root@nagios-monitoring log]# cat perlreport2.log Nagios web->email reporter program. nagios-reporter.v131.pl --help This screen --email= Send to this address instead of the default address "shivrajsingh@indialends.com" --type=overnight Overnight report, from 17h last working day to Today (9am) --type=daily Daily report, 09:00 last working day to Today (9am) --type=weekly Weekly report, 9am 7 days ago, until 9am today (run at 9am friday!) --type=monthly Monthly report, 1st of prev month at 9am to last day of month, 9am --embedcss Downloads the CSS file and embeds it into the main HTML to enable Lotus Notes to work (yet another reason to hate Notes)



Multiple E-mail addresses
by rwalraven, January 31, 2018

Have changed smtp->to(split(/,/,$mailcc)); so that multiple e-mail addresses can be entered



Script don't work with SSL enable
by piso_piso70, November 30, 2017

Hi, after enable SSL (https://nagioscore.localdomain.com) script stopped working. Error message is: Error: 500 Can't connect to nagioscore.localdomain.com:443 Sameone can help me? thanks



Nice script
by echi24, May 31, 2013

Very helpful script. I have added the "cc" because this script only allow me to send to only one email address. With the CC I can send more email group address.



Works Well... BUT....
by shawnbrito, March 31, 2013

Its works as described, BUT the whole css is a bit of a puzzle... What do I do with it?.. How do I embed it??.. I'm using Thunderbird and the layout looks a bit washed out without the css... On a side Note: If your system uses sendmail, you can set the $mailhost to 'localhost' and get it to work.. Our email server is configured to Deny direct Relaying of messages - hence the 'localhost'



Embeded css doesnot work
by akmarwang, November 30, 2012

Embeded css doesnot work. Can someone help??



Works pretty well
by corcoran, April 30, 2012

This just chucks the last couple hundred alerts out - will need a bit of jigging to do anything more specific (like specify host). Had some problems with the file 1) Ubuntu's shebang line is different (line 1) 2) PHP needed CPAN install Date::Manip with PHP 5.10.0 to do the date stuff correctly.. It's a good starting point though so will put in extra variables to get it to report on specifics! cheers



Nice one
by e314, November 30, 2010

Very useful script, I'm not familiar with perl but it's well written and easy to understand. Thanks.



Project Stats
Rating
4.1 (11)
Favorites
1
Views
125,315