Automatic Report Generation

Gerhard Lausser Gerhard.Lausser at consol.de
Fri Apr 25 23:02:30 CEST 2008


 

> What I need is a simple availability report, like I can 
> generate in the Web GUI of the Nagios.

Create a report manually and when you click on the "Generate Availability
Report!" button keep an eye on the apache logfile. Then take that url from
the logfile (something with ...../avail.cgi?....).
In a small script you can get the raw html of the report at any time with
wget --output-document=report.html <the url>

Then you can convert the html file with this:
http://search.cpan.org/~autrijus/PDF-FromHTML-0.08/script/html2pdf.pl

With the mutt mailer you can send a mail with an attachment

#! /bin/bash
wget --output-document=report.html <the url>
html2pdf.pl report.html > report.pdf
mutt -s "report" -a report.pdf recipients at somewhere.com
rm report.html report.pdf

This is not the exact solution, i just wrote it down without trying it.

Gerhard


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list