[Announce] Nagios_Simple_Report on NagiosExchange/CPAN.
Stanley.Hopcroft at Dest.gov.au
Stanley.Hopcroft at Dest.gov.au
Fri Jan 20 00:16:41 CET 2006
Dear Folks,
I am writing to announce that Nagios::Report, a Perl module to munge
data from the Nagios all hosts/services availability report is on CPAN
and NagiosExchange
(where it is called Nagios_Simple_Report).
The class treats the CSV data from the availability report as a flat
file database and allows
1 multiple reports corresponding to multiple time periods (eg 24x7 and
Business hours)
2 selection of rows - availability records - based on field values
3 specification of columns to appear in the reports
4 transformation of rows by adding columns computed from other col
values
5 sorting of the rows by col vals or functions of the column values
The report data can be output as
1 data on stdout
2 csv data (for use by an SQL processor such as DBI::CSV or simply to
load a database)
3 Excel spreadsheets (using the CPAN module Spreadsheet::WriteExcel
which you must install).
The module provides the capability to use ad-hoc or canned scripts (some
examples of which are included) to produce periodic reports; these
scripts contain user specified callbacks to do the munging.
This site uses such scripts to generate monthly exception reports of all
the hosts that reported outages (as a spreadsheet), and in conjunction
with other tools such as Al Tobeys Nagios::Config module, an aggregate
report of availability per site (again as a spreadsheet with a bar
chart)
where the aggregation is done over the (dependent) nodes at a site and
the site names are extracted from the 'alias' attribute of the host
configuration.
It is also useful for such things as
[sh1517 at acisf011 Nagios-Report-0.001_REL-DIST]$ host_down_report -h
'(?i)bendigo_optus' -t last9days
24x7
HOST_NAME DOWN UP
OUTAGE
Bendigo_Optus_router_PE_i 11-01-2006 14:20:49 11-01-2006
14:25:59 5m 10s
Bendigo_Optus_router_PE_i 11-01-2006 15:06:22 11-01-2006
15:12:52 6m 30s
Bendigo_Optus_router_PE_i 11-01-2006 17:39:48 11-01-2006
17:48:02 8m 14s
Bendigo_Optus_router_PE_i 11-01-2006 17:55:22 11-01-2006
18:02:02 6m 40s
Bendigo_Optus_router_PE_i 11-01-2006 19:28:00 11-01-2006
19:33:10 5m 10s
Bendigo_Optus_router_PE_i 12-01-2006 11:40:23 12-01-2006
11:47:23 7m 0s
Bendigo_Optus_router_PE_i 12-01-2006 13:44:30 12-01-2006
14:04:40 20m 10s
[sh1517 at acisf011 Nagios-Report-0.001_REL-DIST]$
In future, we will probably use this tool to load a database with the
monthly availability data.
4 accessors that make the raw or munged data available to other programs
This module does __NOT_
1 give you an SQL interface to the availability data
2 generate charts as such - at this stage it only generates workbooks or
flat file data.
Charts can be generated - relatively simply - using
Spreadsheet::WriteExcel (see
http://groups.google.com/group/spreadsheet-writeexcel/browse_thread/thre
ad/7bc303cb793ffebd/47de1b364366cf23?q=chart&rnum=9#47de1b364366cf23 )
by
- manually producing an Excel workbook with a chart linked to
worksheets containing data
- extracting the binary part of the workbook containing the chart macro
- generating with Spreadsheet::WriteExcel a new workbook that includes
the chart data from the last step
and fills in the worksheet data that is linked to the charts.
However this requires standalone code
3 give you a 'single sytem view' or 'business view' or any other buzz
word (unless your Nag monitoring provides that data)
Concluding notes.
This module is useful for me and may be for others. Nagios probaby needs
to have its availability data in a DB since
DBs have a huge range of reporting tools, DBs have standard syntax to
extract and munge data, and the
data conversion/parsing effort is less with DBs. That said, this module
can provide what management want and maybe
what they think they want, with less effort than doing it all from
scratch.
The module _is_ on NagiosExchange but I made the fatal mistake of
uploading a file with a high version to CPAN
so it will probably take longer or have a different version number (like
.015).
Yours sincerely,
S Hopcroft
Data Communications
Dept of Education, Science and Training
Level 1, 240 City Walk
Canberra City ACT 2601
+61 2 6211 6110
Fax: +61 2 6123 6262
0412 766 832
Stanley.Hopcroft at DEST.Gov.AU
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
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