Home Directory Addons Reporting Nagios Email Reporter

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Nagios Email Reporter

Rating
11 votes
Favoured:
1
Hits
125421
Files:
FileDescription
nagios-reporter.v131.plNagios Reporter v1.3.1
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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.
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)
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)
Have changed smtp->to(split(/,/,$mailcc));
so that multiple e-mail addresses can be entered
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
byechi24, May 28, 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.
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'
byakmarwang, November 19, 2012
Embeded css doesnot work.
Can someone help??
bycorcoran, 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
bye314, November 29, 2010
2 of 2 people found this review helpful
Very useful script, I'm not familiar with perl but it's well written and easy to understand. Thanks.