Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add collector attribute and visibility reporting #72

Merged
merged 11 commits into from
Jul 28, 2016

Conversation

chris-rock
Copy link
Contributor

@chris-rock chris-rock commented Jul 27, 2016

This audit cookbook PR adds a new method for collecting inspec reports via data_collector(Chef Visibility)

After the code review, these are the remaining tasks

  • add unit tests for the classes
  • document the new 'collector' attribute
    • breaking change for those using the compliance token path since the 'collector' attribute defaults to 'chef-server'
  • need to test the other two collecting methods, chef-server and chef-compliance

This work was done by @alexpop

@alexpop
Copy link
Contributor

alexpop commented Jul 27, 2016

Current enriched data added to the report:

          "event_action": "exec",
          "event_type": "inspec",
          "compliance_summary": {
            "total": 11,
            "end_time": "2016-07-22T19:14:08+01:00",
            "node_name": "chef-client.solo",
            "passed": {
              "total": 3
            },
            "failed": {
              "total": 6,
              "minor": 3,
              "major": 2,
              "critical": 1
            },
            "skipped": {
              "total": 2
            },
            "status": "failed",
            "duration": 0.063081,
            "inspec_version": "0.28.0"
          }

When multiple profiles are executed, these only one report that aggregates profile results and summary information.

Hashes like profiles and controls that have user definable keys are also converted into arrays of hashes.

@arlimus
Copy link
Contributor

arlimus commented Jul 28, 2016

@alexpop Kudos for this huge change!!

@chris-rock @alexpop just one more thing in this review: could we extract the blob from the actual test:
https://github.com/chef-cookbooks/audit/pull/72/files#diff-9a9a9e0554d7eea4f1d1744ab333cfdeR27
I had a hard time reading the actual test with the huge blob in the middle ;)

In either case, this is 👍 from my side.

@alexpop
Copy link
Contributor

alexpop commented Jul 28, 2016

Appreciate the valid feedback Dom, I pushed a new commit.

@chris-rock
Copy link
Contributor Author

Thanks @alexpop

@chris-rock chris-rock merged commit f8547ab into master Jul 28, 2016
@chris-rock chris-rock deleted the ap/insights-report branch July 28, 2016 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants