From 816b1b06ef34c4167197f3574b97c69e78942242 Mon Sep 17 00:00:00 2001 From: Joey Hagedorn Date: Thu, 15 Sep 2005 05:51:48 +0000 Subject: Lots of new docs, quickstart is done (Logical change 1.314) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1280 ce84e21b-d406-0410-9b95-82705330c041 --- doc/reports.xml | 137 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 104 insertions(+), 33 deletions(-) (limited to 'doc') diff --git a/doc/reports.xml b/doc/reports.xml index 6b1e47926..9f9a46516 100644 --- a/doc/reports.xml +++ b/doc/reports.xml @@ -2,21 +2,51 @@ The BCFG2 Reporting System
- Quick Start + Reporting Quick Start + + + <filename>report-configuration.xml</filename> + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + This configuration will generate two separate reports and deliver + them a number of different ways. For more information on exactly what + each section does, please refer to the Configuration section below - Example report config: - Example Report Configuration Here In order to run reports, you need to run the following command - regularly via Cron: - GenerateHostInfo + regularly via Cron: + GenerateHostInfo Once configured correctly, just wait for the e-mail or check - look at the output html files with a web browser. You can run - GenerateHostInfo by hand if you would like - in order to try it out immediately. If you are trying to view a - HTML file and find that it doesn't work as expected, make sure - that the required source directory is in the same directory. They - are static, but might need to be moved from /(prefix)/share/bcfg2/ - in to the directory from which you are viewing your reports. + look at the output html files with a web browser. You can run + GenerateHostInfo by hand if you would like + in order to try it out immediately. If you are trying to view a + HTML file and find that it doesn't work as expected, make sure + that the required source directory is in the same directory. They + are static, but might need to be moved from /share/bcfg2/ + in to the directory from which you are viewing your reports.
@@ -34,49 +64,59 @@ How it all works The BCFG2 Reporting System consists of a number of - elements. The core is the StatReports Executable. StatReports reads + elements. The core is the StatReports + Executable. StatReports reads a default configuration file (or a config file specified on the command line) then prepares and delivers the reports specified in the configuration file. It is expected that this executable will be - run by the adminstrator periodically via CRON or similar + run by the adminstrator periodically via cron + or similar facilty. The executable can also be run manually on demand for a special sort of report that needs to be generated immediately. - StatReports gets the data it reports from a number of - sources. The hostinfo.xml file is specific to the reporting system - and generated by the executable python script "GenerateHostInfo." - Hostinfo.xml contains information about if a host is currently + StatReports gets the data it reports from a number of + sources. The hostinfo.xml + file is specific to the reporting system + and generated by the executable python script GenerateHostInfo + . + Hostinfo.xml contains information about if a + host is currently pingable or not, and a mapping of short hostnames to - FQDNs. GenerateHostInfo will be run automatically by StatReports if - the hostinfo.xml file is older than 23.5 hours. This number is + FQDNs. GenerateHostInfo will be run automatically + by StatReports if the hostinfo.xml + file is older than 23.5 hours. This number is chosen, because it is likely an administrator will recieve reports daily about the status of hosts and if they had run BCFG the - previous night. It is possible to execute GenerateHostInfo to update - the hostinfo.xml file at any interval via cron, but it does take + previous night. It is possible to execute + GenerateHostInfo to update the + hostinfo.xml file at any interval via cron, + but it does take some time to complete, so be sure to give it a few minutes. This will only likely be of use if your BCFG clients are set to update more often than nightly and you would like reports after each run. - The next place StatReports gets data from is the statistics.xml + The next place StatReports gets data from is the + statistics.xml file. This file is maintained by bcfgd, and is updated whenever a client updates, therefore is always up to date, and no maintainence is required on this file. - Finally StatReports is able to get any information out of the - Metadata.xml file. This will likely be most useful in the future + Finally StatReports is able to get any information + out of the metadata.xml file. + This will likely be most useful in the future where the range of reports will include auditing style reports, that must include configuration information.
- Reports Types + Report Types There are a number of report types, and a number of delivery @@ -141,10 +181,10 @@ This delivery produces HTML reports which can be delivered via the WWW. it is important that you copy the directory: - install-root/share/bcfg2/reports/web-rprt-srcs in to the + ]]>/share/bcfg2/reports/web-rprt-srcs in to the same directory as you will be serving web pages from. It includes CSS and JavaScript files necessary to properly - view the www files. + view the WWW files. @@ -153,10 +193,10 @@ This delivery type also should be written to some area - that is likely web accessable. It is plain Rss-- One + that is likely web accessable. It is plain RSS-- One Caveat-- the "Article Link" does not actually point to any web information, because it is not clear that a - corresponding web page exists for any given rss article. + corresponding web page exists for any given RSS article. @@ -176,10 +216,41 @@
Configuration - How to setup the config file, how to setup groups of machines + The report-configuration.xml file is the + standard file that is used + whenever the StatReports executable is run without any + command line arguments. Alternate configuration files, formatted + identically, can be used instead with the -c flag. This can be useful + for running different types of reports at different intervals. For + example: + + Run this hourly: StatReports -c WebAndRssReport-config.xml + Run this daily: StatReports -c emailReports-config.xml + + + The report-configuration.xml + file is structured with a root + ]]> tag at the top level. Within this tag any number + of + ]]> tags can be inserted. Each report is structured + around a group of machines. ]]> tags may individually + reference a machine by hostname (not FQDN), or also by a Python Regular + Expression. More information can be found about such Regexes at: + http://docs.python.org/lib/re-syntax.html. + + Any number of ]]> elements can be made for a + given + report. A delivery consists of a mechanism and a type. + The mechanism would be + something like Mail or Web, and they type would reference the content + of the report. Some are tailored to overall machine health, while + others could be best fit for auditing purposes - http://docs.python.org/lib/re-syntax.html + Finally, each ]]> contains one or more + ]]> tags. In the + case of an RSS or WWW report, the destination should be a complete path + to the output file. In e-mail based reports the destination should be + a complete e-mail address. - Writing Custom Reports
\ No newline at end of file -- cgit v1.2.3-1-g7c22