Search All Sites
Nagios Live WebinarsLet our experts show you how Nagios can help your organization.
Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.
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.
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
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'
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!