-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
plugin: update cpu for collectd 5.8 #801
Conversation
@@ -5,6 +5,8 @@ | |||
Boolean $reportbycpu = true, | |||
Boolean $valuespercentage = false, | |||
Boolean $reportnumcpu = false, | |||
Boolean $reportgueststate = false, |
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.
datatypes \o/
templates/plugin/cpu.conf.erb
Outdated
@@ -6,5 +6,9 @@ | |||
<% if scope.lookupvar('collectd::collectd_version_real') and scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.6']) >= 0 -%> | |||
ReportNumCpu <%= @reportnumcpu %> | |||
<% end -%> | |||
<% if scope.lookupvar('collectd::collectd_version_real') and scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.8']) >= 0 -%> |
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.
if @collectd::collectd_version_real
should work as well. scope.lookupvar() is legacy stuff to be compatible with very old puppet versions. It isn't needed anymore
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.
I don't get why this is even needed, I have checked how this variable is built, and if the fact return null or undef, we pick the minimal_version. So it can never be null or I miss something ?
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.
I'm not 100% sure if that's still needed. That's something we could check and cleanup.
templates/plugin/cpu.conf.erb
Outdated
<% if scope.lookupvar('collectd::collectd_version_real') and scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.8']) >= 0 -%> | ||
ReportGuestState <%= @reportgueststate %> | ||
SubtractGuestState <%= @subtractgueststate %> | ||
<% end -%> |
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.
are you interested in converting this erb template into epp? This is not required, but we would be very happy about it :)
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's OK, the file small enought, I done it :)
Thanks for the PR @sileht ! I added some inline comments. |
This change adds options for cpu plugin present since collectd 5.8
This change adds cpu plugin options added in collectd 5.8