Skip to content

Commit

Permalink
Merge pull request #2 from voxpupuli/master
Browse files Browse the repository at this point in the history
Merge voxpupuli master
  • Loading branch information
MichalRebisz authored Apr 15, 2020
2 parents 1a628a3 + 529dab5 commit a431377
Show file tree
Hide file tree
Showing 92 changed files with 1,754 additions and 340 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fixtures:
apt: https://github.com/puppetlabs/puppetlabs-apt.git
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
concat: https://github.com/puppetlabs/puppetlabs-concat.git
epel: https://github.com/stahnma/puppet-module-epel.git
epel: https://github.com/voxpupuli/puppet-epel.git
yumrepo_core:
repo: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
puppet_version: ">= 6.0.0"
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.10.1'
modulesync_config_version: '2.12.0'
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
- set: ubuntu1604-64
- set: ubuntu1804-64
- set: centos7-64
- set: centos8-64
- set: debian8-64
secure: "FAK3Izs5bSZyblGvcFnGWm0exZV5+v9pbwfRDD2oihWxX3U3pArGW+3XcwcJfLQgrUYBsOTmHC8yPjlgTBYeIt/5pvg9X+3jwNgeto6kozpI/nvAq4NtcHhzxRejuPELhFYeXZ3hEw0w+v/ZRo2cNLwI0LLpiWEDvCMZN1CJ2RY="
spec/spec_helper.rb:
spec_overrides: "require 'spec_helper_methods'"
mock_with: ':mocha'
spec/spec_helper_acceptance.rb:
unmanaged: false
24 changes: 16 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,43 @@ matrix:
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=ubuntu1604-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1604-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=ubuntu1804-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=ubuntu1804-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=centos7-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=centos7-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=centos8-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=centos8-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=debian8-64 CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=debian8-64 CHECK=beaker
services: docker
branches:
only:
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,67 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v12.0.0](https://github.com/voxpupuli/puppet-collectd/tree/v12.0.0) (2020-04-04)

[Full Changelog](https://github.com/voxpupuli/puppet-collectd/compare/v11.4.0...v12.0.0)

**Breaking changes:**

- \[collectd\] rename log\_parser to logparser [\#930](https://github.com/voxpupuli/puppet-collectd/pull/930) ([prabiegx](https://github.com/prabiegx))
- Change all `port` parameters to use `Stdlib::Port` [\#906](https://github.com/voxpupuli/puppet-collectd/pull/906) ([bastelfreak](https://github.com/bastelfreak))

**Fixed bugs:**

- Install disk package if required prior CentOS 8 [\#929](https://github.com/voxpupuli/puppet-collectd/pull/929) ([NikolayTsvetkov](https://github.com/NikolayTsvetkov))

## [v11.4.0](https://github.com/voxpupuli/puppet-collectd/tree/v11.4.0) (2020-03-29)

[Full Changelog](https://github.com/voxpupuli/puppet-collectd/compare/v11.3.0...v11.4.0)

**Implemented enhancements:**

- Add Plugin Log parser [\#912](https://github.com/voxpupuli/puppet-collectd/pull/912) ([MichalRebisz](https://github.com/MichalRebisz))

**Fixed bugs:**

- processes-config.conf file is not created [\#926](https://github.com/voxpupuli/puppet-collectd/issues/926)
- Create processes plugin configuration on RedHat [\#927](https://github.com/voxpupuli/puppet-collectd/pull/927) ([traylenator](https://github.com/traylenator))
- Skip Load:ReportRelative as problematic for collectd 5.9.0 [\#924](https://github.com/voxpupuli/puppet-collectd/pull/924) ([traylenator](https://github.com/traylenator))
- Ignore more installed versions of python during tests [\#923](https://github.com/voxpupuli/puppet-collectd/pull/923) ([traylenator](https://github.com/traylenator))

## [v11.3.0](https://github.com/voxpupuli/puppet-collectd/tree/v11.3.0) (2020-03-19)

[Full Changelog](https://github.com/voxpupuli/puppet-collectd/compare/v11.2.0...v11.3.0)

**Implemented enhancements:**

- New utils parameter to install collectdctl [\#919](https://github.com/voxpupuli/puppet-collectd/pull/919) ([traylenator](https://github.com/traylenator))
- Require puppet-epel over stahnma-epel [\#918](https://github.com/voxpupuli/puppet-collectd/pull/918) ([traylenator](https://github.com/traylenator))
- Add CentOS 8 support [\#917](https://github.com/voxpupuli/puppet-collectd/pull/917) ([traylenator](https://github.com/traylenator))
- Add dpdk\_telemetry plugin [\#913](https://github.com/voxpupuli/puppet-collectd/pull/913) ([prabiegx](https://github.com/prabiegx))

**Fixed bugs:**

- write\_http/disk is own sub package on CentOS 8 [\#920](https://github.com/voxpupuli/puppet-collectd/pull/920) ([traylenator](https://github.com/traylenator))

**Closed issues:**

- Time for a new version ? [\#684](https://github.com/voxpupuli/puppet-collectd/issues/684)

## [v11.2.0](https://github.com/voxpupuli/puppet-collectd/tree/v11.2.0) (2020-02-25)

[Full Changelog](https://github.com/voxpupuli/puppet-collectd/compare/v11.1.0...v11.2.0)

**Implemented enhancements:**

- Add dcpmm plugin [\#914](https://github.com/voxpupuli/puppet-collectd/pull/914) ([prabiegx](https://github.com/prabiegx))
- Add pcie\_errors plugin [\#911](https://github.com/voxpupuli/puppet-collectd/pull/911) ([prabiegx](https://github.com/prabiegx))
- Add SNMP agent plugin [\#910](https://github.com/voxpupuli/puppet-collectd/pull/910) ([MichalRebisz](https://github.com/MichalRebisz))

**Merged pull requests:**

- Plugin Mcelog default config [\#909](https://github.com/voxpupuli/puppet-collectd/pull/909) ([MichalRebisz](https://github.com/MichalRebisz))

## [v11.1.0](https://github.com/voxpupuli/puppet-collectd/tree/v11.1.0) (2020-02-08)

[Full Changelog](https://github.com/voxpupuli/puppet-collectd/compare/v11.0.0...v11.1.0)
Expand Down
46 changes: 4 additions & 42 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,9 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
gem 'rspec-puppet-facts', '>= 1.9.5', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'puppet-lint-version_comparison-check', :require => false
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint-absolute_classname-check', '>= 2.0.0', :require => false
gem 'puppet-lint-topscope-variable-check', :require => false
gem 'puppet-lint-legacy_facts-check', :require => false
gem 'puppet-lint-anchor-check', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'parallel_tests', :require => false
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end

group :development do
Expand All @@ -42,27 +24,7 @@ group :development do
end

group :system_tests do
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 4.2.0', :require => false
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
gem 'voxpupuli-acceptance', :require => false
end

group :release do
Expand Down
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ documentation for each plugin for configurable attributes.
* `df` (see [collectd::plugin::df](#class-collectdplugindf) below)
* `disk` (see [collectd::plugin::disk](#class-collectdplugindisk) below)
* `dns` (see [collectd::plugin::dns](#class-collectdplugindns) below)
* `dcpmm` (see [collectd::plugin::dcpmm](#class-collectdplugindcpmm) below)
* `dpdk_telemetry` (see [collectd::plugin::dpdk_telemetry](#class-collectdplugindpdk_telemetry) below)
* `entropy` (see [collectd::plugin::entropy](#class-collectdpluginentropy) below)
* `exec` (see [collectd::plugin::exec](#class-collectdpluginexec) below)
* `ethstat` (see [collectd::plugin::ethstat](#class-collectdpluginethstat) below)
Expand Down Expand Up @@ -160,6 +162,7 @@ documentation for each plugin for configurable attributes.
* `nut` (see [collectd::plugin::nut](#class-collectdpluginnut) below)
* `openldap` (see [collectd::plugin::openldap](#class-collectdpluginopenldap) below)
* `openvpn` (see [collectd::plugin::openvpn](#class-collectdpluginopenvpn) below)
* `pcie_errors` (see [collectd::plugin::pcie_errors](#class-collectdpluginpcie_errors) below)
* `perl` (see [collectd::plugin::perl](#class-collectdpluginperl) below)
* `ping` (see [collectd::plugin::ping](#class-collectdpluginping) below)
* `postgresql` (see [collectd::plugin::postgresql](#class-collectdpluginpostgresql)
Expand All @@ -176,6 +179,7 @@ documentation for each plugin for configurable attributes.
* `sensors` (see [collectd::plugin::sensors](#class-collectdpluginsensors) below)
* `smart` (see [collectd::plugin::smart](#class-collectdpluginsmart) below)
* `snmp` (see [collectd::plugin::snmp](#class-collectdpluginsnmp) below)
* `snmp_agent` (see [collectd::plugin::snmp_agent](#class-collectdpluginsnmpagent) below)
* `statsd` (see [collectd::plugin::statsd](#class-collectdpluginstatsd) below)
* `swap` (see [collectd::plugin::swap](#class-collectdpluginswap) below)
* `syslog` (see [collectd::plugin::syslog](#class-collectdpluginsyslog) below)
Expand Down Expand Up @@ -582,6 +586,26 @@ Boolean for SelectNumericQueryTypes configuration option.

- *Default*: true

#### Class: `collectd::plugin::dpdk_telemetry`

```puppet
class { 'collectd::plugin::dpdk_telemetry':
client_socket_path => '/var/run/.client',
dpdk_socket_path => '/var/run/dpdk/rte/telemetry',
}
```

#### Class: `collectd::plugin::dcpmm`

```puppet
class { 'collectd::plugin::dcpmm':
interval => 10.0,
collect_health => false,
collect_perf_metrics => true,
enable_dispatch_all => false,
}
```

#### Class: `collectd::plugin::entropy`

```puppet
Expand Down Expand Up @@ -1245,6 +1269,17 @@ class { 'collectd::plugin::openvpn':
}
```

#### Class: `collectd::plugin::pcie_errors`

```puppet
class { 'collectd::plugin::pcie_errors':
source => undef,
access_dir => undef,
report_masked => false,
persistent_notifications => false,
}
```

#### Class: `collectd::plugin::perl`

This class has no parameters and will load the actual perl plugin.
Expand Down Expand Up @@ -1587,6 +1622,8 @@ You will need to add this to [collectd::config::typesdb](https://github.com/voxp
via hiera or in a manifest. Failure to set the types.db.custom content will
result in *no* metrics from the rabbitmq plugin.

The rabbitmq plugin has not been ported to python3 and will fail on CentOS 8 [#75](https://github.com/nytimes/collectd-rabbitmq/issues/75)

set typesdb to include the collectd-rabbitmq types.db.custom

```yaml
Expand Down Expand Up @@ -1702,7 +1739,39 @@ class { 'collectd::plugin::snmp':
},
}
```
#### Class: `collectd::plugin::snmp_agent`

```puppet
class {'collectd::plugin::snmp_agent':
table => {
ifTable => {
'indexoid' => 'IF-MIB::ifIndex',
'sizeoid' => 'IF-MIB::ifNumber',
data => [{
ifDescr => {
'plugin' => 'interface',
'oids' => 'IF-MIB::ifDescr'
},
'ifDescr2' => {
'plugin' => 'interface2',
'oids' => 'IF-MIB::ifDescr2'
}
}]
}
},
data => {
memAvailReal => {
'plugin' => 'memory',
'type' => 'memory',
'oids' => '1.3.6.1.4.1.2021.4.6.0',
'typeinstance' => 'free',
'indexkey' => {
'source' => 'PluginInstance'
}
}
}
}
```
#### Class: `collectd::plugin::statsd`

```puppet
Expand Down
33 changes: 1 addition & 32 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'voxpupuli/test/rake'

# load optional tasks for releases
# only available if gem group releases is installed
Expand All @@ -7,37 +7,6 @@ begin
rescue LoadError
end

PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'

desc 'Auto-correct puppet-lint offenses'
task 'lint:auto_correct' do
Rake::Task[:lint_fix].invoke
end

desc 'Run acceptance tests'
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end

desc 'Run tests'
task test: [:release_checks]

namespace :check do
desc 'Check for trailing whitespace'
task :trailing_whitespace do
Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
File.foreach(filename).each_with_index do |line, index|
if line =~ %r{\s\n$}
puts "#{filename} has trailing whitespace on line #{index + 1}"
exit 1
end
end
end
end
end
Rake::Task[:release_checks].enhance ['check:trailing_whitespace']

desc "Run main 'test' task and report merged results to coveralls"
task test_with_coveralls: [:test] do
if Dir.exist?(File.expand_path('../lib', __FILE__))
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/python_dir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
else
Facter::Util::Resolution.exec('python3 -c "import site; print(site.getsitepackages()[0])"')
end
elsif File.exist?('/usr/libexec/platform-python')
Facter::Util::Resolution.exec('/usr/libexec/platform-python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"')
else
''
end
Expand Down
7 changes: 7 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# @summary installs and configures collectd
# @example Install collectd utilities
# class{'collectd':
# utils => true,
# }
#
# @param utils Install collectd utilities package containing collectdctl, collectd-nagios
class collectd (
Boolean $autoloadplugin = $collectd::params::autoloadplugin,
String $collectd_hostname = $collectd::params::collectd_hostname,
Expand Down Expand Up @@ -36,6 +42,7 @@
Optional[Integer] $write_queue_limit_high = $collectd::params::write_queue_limit_high,
Optional[Integer] $write_queue_limit_low = $collectd::params::write_queue_limit_low,
Integer[1] $write_threads = $collectd::params::write_threads,
Boolean $utils = $collectd::params::utils,
) inherits collectd::params {

$collectd_version_real = pick_default($facts['collectd_version'], $minimum_version)
Expand Down
Loading

0 comments on commit a431377

Please sign in to comment.