-
Notifications
You must be signed in to change notification settings - Fork 40
Enable remote PuppetDB collection in 2019.8.5+ #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the function puppet_metrics_dashboard::puppetdb_no_remote_metrics was removed but I don't see that a file for puppet_metrics_dashboard::puppetdb_v2_metrics was added?
|
Good call. I just pushed up a commit with it in there. |
b04f853
to
f877e88
Compare
|
I was not expecting that failure. I can fix it by adding |
30affb9
to
eec9d7b
Compare
|
Alright, that last commit should fix some of the last issues. Hopefully, the acceptance tests are green now. |
Prior to this commit, there was a fact that was not scoped. This commit adds a puppetdb version fact and consolidates the dashboard overwrite fact into the puppet_metrics_dashboard hash.
Prior to this commit, PuppetDB collection was restricted to localhost on recent PuppetDB versions by default. It was possible to specify the PuppetDB nodes manually, but the default parameters would not populate based on specific PuppetDB versions. This commit updates the logic to automatically collect data from PuppetDB versions that allow remote collection.
Prior to this commit there was a function that did not align with its function. puppetdb_no_remote_metrics was used to determine if the v1 or v2 endpoints and dashboards were used. This commit renames the function to better align with its current purpose.
Prior to this commit, there was a spec test failure due to an empty array that should be populated by the trusted certname fact. This commit adds that fact.
Prior to this commit, the puppetdb v2 logic was more complex than needed. This update changes to anything over 5.5.19 to use v2, which should fix the issues with some newer versions using v1 metrics.
Prior to this commit, the centos spec tests were not matching into with the os name fact and being skipped. This commit fixes those spec tests by adding Centos to the when case.
9efcf34
to
0c232d9
Compare
This PR enables remote PuppetDB collection by default when using PE 2019.8.5+. It does this by adding a new PuppetDB version fact and using that in a PuppetDB query for the PuppetDB nodes. The PR includes some clean up such as the following.
puppet_metrics_dashboardhash