New Reporting System
Now available in Bcfg2 0.8.2
Installation
Summary and Features
The new reporting system was implemented to address a number of deficiencies in the previous system. By storing statistics data in a relational database, we are now able to view and analyze more information about the state of the configuration, including information about previous configuration. Specific features in the new system include:
- More recent data concerning hosts. The import script may be run quite often, updating the database that contains all statistics information. In the future we anticipate development of a database based statistics module for the server that will allow statistics updates to happen immediately as configuration changes happen.
- Additional information display in reports. Primarily, reasons for configuration item verification failure are now accessible. This additional data is provided only by the most recent client.
- Instead of static pages, pages are generated on the fly, allowing users to drill down to find out about a specific host, rather than have one huge page with too much information.
Planned improvements include
- Accounts, customized displays for each admin. And privacy of config data.
- Config browsing capabilities; to look at your config in an interesting way. Fixing all the known bugs from below.
Unfortunately with all the improvements, there are a few less exciting elements about the new reporting system. The new reporting system moves away from static pages and towards a real web application, which causes mainly problems with dependancies and makes installation and more difficult. This should become less of a problem over time as Django is packaged and we develop a better installation process for a web app. This should become clear when reading the Installation section that follows.
Usage
You can use these new reports in tandem with the old system. Currently the new reporting system simply periodically runs an importer script via cron. This imports the XML statistics and clients files to the relational database, building historical information. In the future, a new statistics module in the server will allow direct writing to the database whenever a configuration interaction occurs, which will make the reports always up to date.
New reports script in 0.9.6pre2 and later
Command Line Use
bcfg2-reports
bcfg2-reports allows you to retrieve data from the database about clients, and the states of their current interactions. It also allows you to change the expired/unexpired states.
The utility runs as a standalone application. It does, however, use the models from /src/lib/Server/Reports/reports/models.py.
A number of different options can be used to change what bcfg2-reports displays:
- -a : shows all hosts, including expired hosts
- -b NAME : single-host mode - shows bad entries from the current interaction of NAME
- -c : shows only clean hosts
- -d : shows only dirty hosts
- -e NAME : single-host mode - shows extra entries from the current interaction of NAME
- -h : shows help and usage info about bcfg2-reports
- -s NAME : single-host mode - shows bad and extra entries from the current interaction of NAME
- -x NAME : toggles expired/unexpired state of NAME
- --badentry=KIND,NAME : shows only hosts whose current interaction has bad entries in of KIND kind and NAME name; if a single argument ARG1 is given, then KIND,NAME pairs will be read from a file of name ARG1
- --extraentry=KIND,NAME : shows only hosts whose current interaction has extra entries in of KIND kind and NAME name; if a single argument ARG1 is given, then KIND,NAME pairs will be read from a file of name ARG1
- --fields=ARG1,ARG2,... : only displays the fields ARG1,ARG2,... (name,time,state)
- --sort=ARG1,ARG2,... : sorts output on ARG1,ARG2,... (name,time,state)
Screenshots
Attachments
-
summary_cal.jpg
(171.2 KB) - added by hagedorn
3 years ago.
Report Summary View with Calendar Date Selector
-
node_dropdown.jpg
(145.0 KB) - added by hagedorn
3 years ago.
Node Info View with dropdown to view each Bcfg run
-
item_detail.jpg
(95.9 KB) - added by hagedorn
3 years ago.
Configuration Element Detail, showing reason for verification of failure and other hosts that have the same problem either Now, or at a specific time in the past


