Skip to content

Commit

Permalink
Merge d59352c into 3daaf69
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithWard committed Jul 30, 2020
2 parents 3daaf69 + d59352c commit 4d85de2
Show file tree
Hide file tree
Showing 154 changed files with 196 additions and 345 deletions.
1 change: 0 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
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
2 changes: 0 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# private
class collectd::config inherits collectd {

assert_private()

$_conf_content = $collectd::purge_config ? {
Expand Down Expand Up @@ -42,5 +41,4 @@
}

File['collectd.d'] -> Concat <| tag == 'collectd' |>

}
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
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)

contain collectd::repo
Expand Down
6 changes: 2 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# @summary installs collectd
# @api private
class collectd::install {

assert_private()

if $collectd::manage_package {
Expand All @@ -13,10 +12,9 @@
}

if $collectd::utils and ( $facts['os']['family'] == 'Debian' or
( $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 )) {
package{'collectd-utils':
( $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 )) {
package { 'collectd-utils':
ensure => $collectd::package_ensure,
}
}

}
5 changes: 2 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
class collectd::params {

$autoloadplugin = false
$fqdnlookup = true
$collectd_hostname = $facts['networking']['hostname']
Expand All @@ -16,7 +15,7 @@
$read_threads = 5
$write_threads = 5
$timeout = 2
$typesdb = [ '/usr/share/collectd/types.db' ]
$typesdb = ['/usr/share/collectd/types.db']
$write_queue_limit_high = undef
$write_queue_limit_low = undef
$package_ensure = 'present'
Expand All @@ -38,7 +37,7 @@

case $facts['os']['family'] {
'Debian': {
$package_name = [ 'collectd', 'collectd-core' ]
$package_name = ['collectd', 'collectd-core']
$package_provider = 'apt'
$collectd_dir = '/etc/collectd'
$plugin_conf_dir = "${collectd_dir}/conf.d"
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
$plugin = $name,
Optional[Integer] $flushinterval = undef,
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Optional[Integer[1]] $interval = undef,
Hash $aggregators = {},
) {

include collectd

collectd::plugin { 'aggregation':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation/aggregator.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Optional[Boolean] $calculatemaximum = undef,
Optional[Boolean] $calculatestddev = undef,
) {

include collectd
include collectd::plugin::aggregation

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Boolean $graphiteseparateinstances = false,
Boolean $graphitealwaysappendds = false,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp1.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
Optional[Integer] $retry_delay = undef,
Optional[Integer] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Optional[Integer[1]] $interval = undef,
Optional[Array] $package_install_options = $collectd::package_install_options,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/battery.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Boolean $report_degraded = false,
Boolean $query_state_fs = false,
) {

include collectd

collectd::plugin { 'battery':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/bind.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Array[Collectd::Bind::View] $views = [],
Optional[Integer[1]] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/ceph.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
Boolean $manage_package = $collectd::manage_package,
String $package_name = 'collectd-ceph'
) {

include collectd

if $manage_package {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cgroups.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Boolean $ignore_selected = false,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cgroups':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/chain.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Collectd::Filter::Target $defaulttarget = 'write',
Array $rules = []
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/connectivity.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
Boolean $manage_package = $collectd::manage_package,
Array[String[1]] $interfaces = [],
) {

include collectd

if $manage_package and $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/conntrack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::conntrack (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'conntrack':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/contextswitch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Enum['present', 'absent'] $ensure = 'present',
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'contextswitch':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
Boolean $subtractgueststate = true,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cpu':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpufreq.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::cpufreq (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'cpufreq':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/csv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
$interval = undef,
$storerates = false
) {

include collectd

collectd::plugin { 'csv':
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/cuda.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

if ($_manage_package) and ($provider_proxy) {
$install_options = [{'--proxy' => $provider_proxy}]
$install_options = [{ '--proxy' => $provider_proxy }]
} else {
$install_options = undef
}
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/curl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
$ensure = 'present',
$manage_package = undef,
$interval = undef,
$pages = { },
$pages = {},
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl/page.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Optional[Array[Hash]] $matches = undef,
String $plugininstance = $name, # You can have multiple <Page> with the same name.
) {

include collectd
include collectd::plugin::curl

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl_json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$order = '10',
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
5 changes: 2 additions & 3 deletions manifests/plugin/dbi.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# https://collectd.org/wiki/index.php/Plugin:DBI
class collectd::plugin::dbi (
$ensure = 'present',
$databases = { },
$queries = { },
$databases = {},
$queries = {},
$packages = undef,
$interval = undef,
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/dbi/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
Array $query = [],
Optional[Integer[1]] $db_query_interval = undef,
) {

include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_db_${title}":
concat::fragment { "collectd_plugin_dbi_conf_db_${title}":
order => '50',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/database.conf.erb'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dbi/query.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_query_${title}":
concat::fragment { "collectd_plugin_dbi_conf_query_${title}":
order => '30',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/query.conf.erb'),
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/dcpmm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Boolean $enable_dispatch_all = false,

) {

include collectd

if $collect_health and $collect_perf_metrics {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/df.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
Boolean $valuesabsolute = true,
Boolean $valuespercentage = false,
) {

include collectd

collectd::plugin { 'df':
Expand Down
5 changes: 2 additions & 3 deletions manifests/plugin/disk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
$udevnameattr = undef,
Optional[Array[String]] $package_install_options = undef
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
if $manage_package != undef {
$_manage_package = $manage_package
} else {
if versioncmp($collectd::collectd_version_real, '5.5') >= 0
and versioncmp($facts['os']['release']['major'],'8') >= 0 {
and versioncmp($facts['os']['release']['major'],'8') >= 0 {
$_manage_package = true
} else {
} else {
$_manage_package = false
}
}
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/dns.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
$package_name = 'collectd-dns',
Variant[String,Boolean] $selectnumericquerytypes = true,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/dpdk_telemetry.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Stdlib::Absolutepath $client_socket_path = '/var/run/.client',
Stdlib::Absolutepath $dpdk_socket_path = '/var/run/dpdk/rte/telemetry',
) {

include collectd

collectd::plugin { 'dpdk_telemetry':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/entropy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
$ensure = 'present',
$interval = undef,
) {

include collectd

collectd::plugin { 'entropy':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/ethstat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
$mappedonly = false,
$interval = undef,
) {

include collectd

collectd::plugin { 'ethstat':
Expand Down
7 changes: 3 additions & 4 deletions manifests/plugin/exec.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
$ensure = 'present',
Boolean $globals = false,
) {

include collectd

collectd::plugin { 'exec':
Expand All @@ -18,7 +17,7 @@
# should be loaded after global plugin configuration
$exec_conf = "${collectd::plugin_conf_dir}/exec-config.conf"

concat{ $exec_conf:
concat { $exec_conf:
ensure => $ensure,
mode => $collectd::config_mode,
owner => $collectd::config_owner,
Expand All @@ -27,13 +26,13 @@
ensure_newline => true,
}

concat::fragment{ 'collectd_plugin_exec_conf_header':
concat::fragment { 'collectd_plugin_exec_conf_header':
order => '00',
content => '<Plugin exec>',
target => $exec_conf,
}

concat::fragment{ 'collectd_plugin_exec_conf_footer':
concat::fragment { 'collectd_plugin_exec_conf_footer':
order => '99',
content => '</Plugin>',
target => $exec_conf,
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/exec/cmd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
Array $exec = [],
Array $notification_exec = [],
) {

include collectd
include collectd::plugin::exec

concat::fragment{ "collectd_plugin_exec_conf_${title}":
concat::fragment { "collectd_plugin_exec_conf_${title}":
order => '50', # somewhere between header and footer
target => $collectd::plugin::exec::exec_conf,
content => template('collectd/plugin/exec/cmd.conf.erb'),
Expand Down
Loading

0 comments on commit 4d85de2

Please sign in to comment.