Skip to content

Commit

Permalink
Update module-collectd to a1901fb
Browse files Browse the repository at this point in the history
a1901fb Merge pull request redhat-openstack#279 from throck/master
67af5f9 add rspec test
a6c102b Merge pull request redhat-openstack#252 from simonpasquier/issue-251
07326b3 Drop support for Ubuntu 10.04
83095e1 Bump version in metadata.json to 3.4.0
76d4ebe Merge pull request redhat-openstack#277 from pdxcat/release_340
3f06a17 Release 3.4.0
a622ba8 Merge pull request redhat-openstack#276 from pdxcat/ruby220
e4f3a17 Add ruby 2.2.0
4b569da Merge pull request redhat-openstack#275 from pdxcat/test_puppet4
ea331d6 Drop tests for puppet 3.0
b7abefb Update all the gems
63bf721 Add puppet4 to .travis and update ruby to 2.1.6
b9b1cc1 Merge pull request redhat-openstack#270 from piotr1212/cpu_options
df5d2bb Merge pull request redhat-openstack#272 from piotr1212/rake_validate_type
016458c Merge pull request redhat-openstack#273 from piotr1212/validate_re_on_int
7acc2bd Merge branch 'issue-251' of github.com:simonpasquier/puppet-module-collectd into issue-251
cff8b95 Fix collectd::plugin::write_http for RedHat
a442bac plugin_cpu: add version info to readme
ade651e add tests for cpu plugin
f00ef92 snpm/host.pp validate_re validate on string
192eab7 quote reserved word type in tail.pp so rake validate succeeds
2c5e030 add new cpu plugin options introduced in collectd 5.5
8c2ad77 add support for protocols plugin
ce656ce Fix collectd::plugin::write_http for RedHat

Change-Id: I2dd497902845c2b1e3576a8fa54d0f96519764cc
  • Loading branch information
xbezdick committed Jun 23, 2015
1 parent 659ab03 commit 4529a4d
Show file tree
Hide file tree
Showing 15 changed files with 317 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ mod 'memcached',
:git => 'https://github.com/saz/puppet-memcached.git'

mod 'module-collectd',
:commit => '27c81f69d00722ce7a6ac1e9c13b8e76fc7a5204',
:commit => 'a1901fb888a9964c9bdc64badc721e033a7d27ce',
:git => 'https://github.com/pdxcat/puppet-module-collectd.git'

mod 'module-data',
Expand Down
24 changes: 12 additions & 12 deletions module-collectd/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
sudo: false
language: ruby
bundler_args: --without system_tests
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
script:
- 'puppet --version'
- 'bundle exec rake validate'
- 'bundle exec rake lint'
- "bundle exec rake spec SPEC_OPTS='--format documentation'"
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.7.5" STRICT_VARIABLES="yes"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.7.5" STRICT_VARIABLES="yes"
env: PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES="yes"
- rvm: 2.1.6
env: PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES="yes"
- rvm: 2.1.6
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 2.2.0
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
notifications:
email: false
22 changes: 22 additions & 0 deletions module-collectd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## 2015-06-16 Release 3.4.0

### Backwards-incompatible changes:

* Implement support for mupltiple Python modules

### Bug fixes

* snmp/host.pp validate_re validate on string
* quote reserved word type in tail.pp

### New features

* add new cpu plugin options introduced in collectd 5.5
* Added absent timers for statsd module.

### Testing enhancements

* Add ruby 2.2.0 to TravisCI
* Add puppet4 to .travis and update ruby to 2.1.6
* Add metadata-json-lint gem

## 2015-04-22 Release 3.3.0

### Backwards-incompatible changes:
Expand Down
105 changes: 57 additions & 48 deletions module-collectd/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.1)
activesupport (4.2.1)
CFPropertyList (2.2.8)
activesupport (4.2.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -18,13 +18,13 @@ GEM
aws-sdk-v1 (1.64.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
beaker (2.10.0)
beaker (2.14.1)
aws-sdk (~> 1.57)
docker-api
fission (~> 0.4)
fog (~> 1.25)
google-api-client (~> 0.8)
hocon (~> 0.0.4)
hocon (~> 0.1)
inifile (~> 2.0)
json (~> 1.8)
minitest (~> 5.4)
Expand All @@ -33,30 +33,32 @@ GEM
rbvmomi (~> 1.8)
rsync (~> 1.0.9)
unf (~> 0.1)
beaker-rspec (5.0.2)
beaker-rspec (5.1.0)
beaker (~> 2.0)
rspec
serverspec (~> 2)
specinfra (~> 2)
builder (3.2.2)
diff-lcs (1.2.5)
docile (1.1.5)
docker-api (1.21.1)
docker-api (1.21.4)
excon (>= 0.38.0)
json
excon (0.45.3)
extlib (0.9.16)
facter (1.7.6)
facter (2.4.4)
CFPropertyList (~> 2.2.6)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.29.0)
fog (1.31.0)
fog-atmos
fog-aws (~> 0.0)
fog-brightbox (~> 0.4)
fog-core (~> 1.27, >= 1.27.4)
fog-core (~> 1.30)
fog-ecloud
fog-google (>= 0.0.2)
fog-json
fog-local
fog-powerdns (>= 0.1.1)
Expand All @@ -76,7 +78,7 @@ GEM
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (0.1.2)
fog-aws (0.4.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
Expand All @@ -92,19 +94,23 @@ GEM
mime-types
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
fog-ecloud (0.1.1)
fog-ecloud (0.1.3)
fog-core
fog-xml
fog-json (1.0.1)
fog-google (0.0.5)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.10)
fog-local (0.2.1)
fog-core (~> 1.27)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (0.0.2)
fog-profitbricks (0.0.3)
fog-core
fog-xml
nokogiri
Expand All @@ -122,7 +128,7 @@ GEM
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (0.4.5)
fog-softlayer (0.4.6)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
Expand Down Expand Up @@ -152,37 +158,37 @@ GEM
multi_json (~> 1.10)
retriable (~> 1.4)
signet (~> 0.6)
googleauth (0.4.0)
googleauth (0.4.1)
faraday (~> 0.9)
jwt (~> 1.4)
logging (~> 1.8)
memoist (~> 0.11)
logging (~> 2.0)
memoist (~> 0.12)
multi_json (= 1.11)
signet (~> 0.6)
hiera (1.3.4)
hiera (2.0.0)
json_pure
hocon (0.0.7)
hocon (0.9.0)
i18n (0.7.0)
inflecto (0.0.2)
inifile (2.0.2)
ipaddress (0.8.0)
json (1.8.2)
json (1.8.3)
json_pure (1.8.2)
jwt (1.4.1)
jwt (1.5.0)
launchy (2.4.3)
addressable (~> 2.3)
little-plugger (1.1.3)
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.8.4)
logging (2.0.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
memoist (0.12.0)
metaclass (0.0.4)
metadata-json-lint (0.0.6)
json
spdx-licenses (~> 1.0)
mime-types (2.4.3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.6.0)
minitest (5.7.0)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.11.0)
Expand All @@ -192,15 +198,15 @@ GEM
net-ssh (2.9.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
puppet (3.7.5)
facter (> 1.6, < 3)
hiera (~> 1.0)
puppet (4.1.0)
facter (> 2.0, < 4)
hiera (>= 2.0, < 3)
json_pure
puppet-lint (1.1.0)
puppet-syntax (2.0.0)
rake
puppet_facts (0.2.1)
puppetlabs_spec_helper (0.10.2)
puppetlabs_spec_helper (0.10.3)
mocha
puppet-lint
puppet-syntax
Expand All @@ -212,35 +218,35 @@ GEM
nokogiri (>= 1.4.1)
trollop
retriable (1.4.1)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.0)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (~> 3.3.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.2.1)
rspec-mocks (3.3.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-puppet (2.1.0)
rspec-support (~> 3.3.0)
rspec-puppet (2.2.0)
rspec
rspec-support (3.2.2)
rspec-support (3.3.0)
rsync (1.0.9)
serverspec (2.14.1)
serverspec (2.18.0)
multi_json
rspec (~> 3.0)
rspec-its
specinfra (~> 2.25)
signet (0.6.0)
specinfra (~> 2.35)
signet (0.6.1)
addressable (~> 2.3)
extlib (~> 0.9)
faraday (~> 0.9)
jwt (~> 1.0)
jwt (~> 1.5)
multi_json (~> 1.10)
simplecov (0.10.0)
docile (~> 1.1.0)
Expand All @@ -249,7 +255,7 @@ GEM
simplecov-html (0.10.0)
spdx-licenses (1.0.0)
json
specinfra (2.30.0)
specinfra (2.36.0)
net-scp
net-ssh
thread_safe (0.3.5)
Expand All @@ -276,3 +282,6 @@ DEPENDENCIES
rspec-puppet
serverspec
simplecov

BUNDLED WITH
1.10.3
25 changes: 24 additions & 1 deletion module-collectd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ documentation for each plugin for configurable attributes.
* `ping` (see [collectd::plugin::ping](#class-collectdpluginping) below)
* `postgresql` (see [collectd::plugin::postgresql](#class-collectdpluginpostgresql) below)
* `processes` (see [collectd::plugin:processes](#class-collectdpluginprocesses) below)
* `protocols` (see [collectd::plugin:protocols](#class-collectdpluginprotocols) below)
* `python` (see [collectd::plugin::python](#class-collectdpluginpython) below)
* `redis` (see [collectd::plugin::redis](#class-collectdpluginredis) below)
* `rrdcached` (see [collectd::plugin::rrdcached](#class-collectdpluginrrdcached) below)
Expand Down Expand Up @@ -158,8 +159,17 @@ class { 'collectd::plugin::conntrack':

####Class: `collectd::plugin::cpu`

* `reportbystate` available from collectd version >= 5.5
* `reportbycpu` available from collectd version >= 5.5
* `valuespercentage` available from collectd version >= 5.5

See [collectd plugin_cpu documentation](https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_cpu) for more details.

```puppet
class { 'collectd::plugin::cpu':
reportbystate => true,
reportbycpu => true,
valuespercentage => true,
}
Expand Down Expand Up @@ -647,6 +657,19 @@ class { 'collectd::plugin::processes':
],
}
```
####Class: `collectd::plugin::protocols`

* `values` is an array of `Protocol` names, `Protocol:ValueName` pairs, or a regex
* see `/proc/net/netstat` and `/proc/net/snmp` for a list of `Protocol` targets

See [collectd.conf documentation] (https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_protocols) for details

```puppet
class { 'collectd::plugin::protocols':
values => ['/^Tcp:*/', '/^Udp:*/', 'Icmp:InErrors' ],
ignoreselected => false,
}
```

####Class: `collectd::plugin::python`

Expand Down Expand Up @@ -977,4 +1000,4 @@ This module shall not use unsupported configuration directives. Look at [templat

Please make use of the search by branch/tags on the collectd github to see when a function has been first released.

Reading the [collectd.conf.pod](https://github.com/collectd/collectd/blob/master/src/collectd.conf.pod) file is good, validating the presence of the code in the .c files is even better.
Reading the [collectd.conf.pod](https://github.com/collectd/collectd/blob/master/src/collectd.conf.pod) file is good, validating the presence of the code in the .c files is even better.
15 changes: 13 additions & 2 deletions module-collectd/manifests/plugin/cpu.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# https://collectd.org/wiki/index.php/Plugin:CPU
class collectd::plugin::cpu (
$ensure = present,
$interval = undef,
$ensure = present,
$reportbystate = true,
$reportbycpu = true,
$valuespercentage = false,
$interval = undef,
) {

validate_bool(
$reportbystate,
$reportbycpu,
$valuespercentage,
)

collectd::plugin {'cpu':
ensure => $ensure,
content => template('collectd/plugin/cpu.conf.erb'),
interval => $interval,
}
}
Loading

0 comments on commit 4529a4d

Please sign in to comment.