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

(SUP-2725) Fix system collection frequency #150

Merged

Conversation

m0dular
Copy link
Contributor

@m0dular m0dular commented Oct 11, 2021

Prior to this commit, the postgres and vmware classes didn't correctly
set the 'minute' parameter of the defined type for collecting metrics.
They lack the "0/" prefix, meaning for a default value of 5 we are
performing the collections on the 5th minute, not repeating every 5
minutes. This commit adds the prefix.

Prior to this commit, the postgres and vmware classes didn't correctly
set the 'minute' parameter of the defined type for collecting metrics.
It lacks the "0/" prefix, meaning for a default value of 5 we are
performing the collections on the 5th minute, not repeating every 5
minutes.  This commit adds the prefix.
@m0dular m0dular requested a review from a team as a code owner October 11, 2021 19:13
@puppet-community-rangefinder
Copy link

puppet_metrics_collector::system::postgres is a class

that may have no external impact to Forge modules.

puppet_metrics_collector::system::vmware is a class

that may have no external impact to Forge modules.

This module is declared in 0 of 578 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Contributor

@jarretlavallee jarretlavallee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add spec tests for the collection_interval to ensure all timers default to the same.

manifests/system/postgres.pp Outdated Show resolved Hide resolved
manifests/system/vmware.pp Outdated Show resolved Hide resolved
@m0dular
Copy link
Contributor Author

m0dular commented Oct 11, 2021

Looks like we have a test for customizing $cron_minute in the defined type here, but this doesn't cover customizing collection_interval in the main classes. I'll add a test that customizes $collection_frequency in the two main classes.

@m0dular
Copy link
Contributor Author

m0dular commented Oct 11, 2021

Added spec tests for all the timers that we customize via $collection_frequency.

This commit adds tests to the puppet_metrics_collector and
puppet_metrics_collector::system classes for customizing the collection
interval.  It also removes the String() casts.
@m0dular m0dular force-pushed the SUP-2725-system-collection-freqency branch from a0fafb8 to 6a3cddb Compare October 11, 2021 22:45
Copy link
Contributor

@jarretlavallee jarretlavallee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jarretlavallee jarretlavallee merged commit cf18b7e into puppetlabs:main Oct 12, 2021
@jarretlavallee
Copy link
Contributor

resolved #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants