forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/pdxcat/puppet-module-coll…
- Loading branch information
Showing
16 changed files
with
142 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# https://collectd.org/wiki/index.php/Plugin:ConnTrack | ||
class collectd::plugin::conntrack ( | ||
$ensure = present, | ||
) { | ||
collectd::plugin {'conntrack': | ||
ensure => $ensure | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# https://collectd.org/wiki/index.php/Plugin:CPUFreq | ||
class collectd::plugin::cpufreq ( | ||
$ensure = present, | ||
) { | ||
collectd::plugin {'cpufreq': | ||
ensure => $ensure | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'spec_helper' | ||
|
||
describe 'collectd::plugin', :type => :define do | ||
|
||
context 'loading a plugin on collectd <= 4.9.4' do | ||
let(:title) { 'test' } | ||
let :facts do | ||
{ | ||
:collectd_version => '5.3', | ||
:osfamily => 'Debian', | ||
} | ||
end | ||
|
||
it 'Will create /etc/collectd/conf.d/10-test.conf with the LoadPlugin syntax with brackets' do | ||
should contain_file('test.load').with_content(/<LoadPlugin/) | ||
end | ||
end | ||
|
||
|
||
context 'loading a plugin on collectd => 4.9.3' do | ||
let(:title) { 'test' } | ||
let :facts do | ||
{ | ||
:collectd_version => '4.9.3', | ||
:osfamily => 'Debian', | ||
} | ||
end | ||
|
||
it 'Will create /etc/collectd/conf.d/10-test.conf with the LoadPlugin syntax without brackets' do | ||
should contain_file('test.load').without_content(/<LoadPlugin/) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Puppet | ||
<% if @collectd_version and (scope.function_versioncmp([@collectd_version, '4.9.4']) >= 0) -%> | ||
<LoadPlugin <%= @plugin %>> | ||
Globals <%= @globals %> | ||
<% if @interval and @collectd_version and (scope.function_versioncmp([@collectd_version, '5.2']) >= 0) -%> | ||
Interval <%= @interval %> | ||
<% end -%> | ||
</LoadPlugin> | ||
<% else -%> | ||
LoadPlugin <%= @plugin %> | ||
<% end -%> | ||
|
||
<%= @content %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
# | ||
<LoadPlugin perl> | ||
Globals true | ||
</LoadPlugin> | ||
|
||
Include "<%= @conf_dir %>/perl/*.conf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters