Install Reporting

Use Reporting to keep track of what happens during the execution of chef-client runs across all of the machines that are under management by Chef. Reports can be generated for the entire organization and they can be generated for specific nodes.

Reporting data is collected during the chef-client run and the results are posted to the Chef server at the end of the chef-client run at the same time the node object is uploaded to the Chef server.

Note

This feature is included as part of the Chef Automate license agreement and is available via subscription.

Requirements

Reporting has the following minimum requirements:

  • Chef server 12
  • chef-client version 11.6.0 (or later)

Reporting can make use of an external database, but to do so Reporting 1.5.5 or later is needed along with Chef server 12.2.0 or later.

The Reporting client is built into the chef-client and can run on all platforms that chef-client is supported on.

Warning

Reporting does not work on chef-client version 11.8.0; upgrade to chef-client version 11.8.2 (or later) if Reporting is being run in your organization.

Warning

The only supported versions of Reporting are 1.5.5 or later.

Install the Server

To set up the Reporting server:

  1. Install the package on each frontend and backend Chef server:

    $ chef-server-ctl install opscode-reporting
    
  2. Reconfigure the Chef server on the backend primary server (bootstrap):

    $ chef-server-ctl reconfigure
    
  3. Reconfigure the Reporting server on the backend primary server (bootstrap):

    $ opscode-reporting-ctl reconfigure
    

    Note

    Starting with Reporting 1.6.0, the Chef MLSA must be accepted when reconfiguring the product. If the Chef MLSA has not already been accepted, the reconfigure process will prompt for a yes to accept it. Or run opscode-reporting-ctl reconfigure --accept-license to automatically accept the license.

  4. Copy the entire /etc/opscode-reporting directory from the backend primary server to all frontend and backend servers. For example, from each server run:

    $ scp -r <Bootstrap server IP>:/etc/opscode-reporting /etc
    

    or from the backend primary server:

    $ scp -r /etc/opscode-reporting <each servers IP>:/etc
    
  5. Reconfigure any Chef server on which Reporting services have been installed:

    $ chef-server-ctl reconfigure
    
  6. Reconfigure Reporting services on each server:

    $ opscode-reporting-ctl reconfigure
    
  7. Verify the installation:

    $ opscode-reporting-ctl test
    

Install the Client

Reporting is automatically enabled in the chef-client (version 11.6.0 or later). In order to check if reporting data is being sent, you can check the output of the chef-client INFO logging level for the log message confirming the data has been sent. At the end of the chef-client run:

$ chef-client -l info
...
...
[date] INFO: Chef Run complete in 1.069059018 seconds
[date] INFO: Running report handlers
[date] INFO: Report handlers complete
Chef Client finished, 2 resources updated
[date] INFO: Sending resource update report (run-id: 51ceb817-ba7e-47e5-9bca-096fe9ef9740)

This includes the run identifier of the chef-client run, which can be used in the knife reporting plugin or the Chef management console to access the reporting information generated during the chef-client run.

Install the Workstation

To set up the Reporting workstation, install the knife reporting plugin . Once installed, the following subcommands will be available: knife runs list, knife runs show.