diff --git a/manifests/plugin/amqp.pp b/manifests/plugin/amqp.pp index cf4d3f494..2609fd034 100644 --- a/manifests/plugin/amqp.pp +++ b/manifests/plugin/amqp.pp @@ -16,6 +16,12 @@ validate_bool($amqppersistent) + if $::osfamily == 'Redhat' { + package { 'collectd-amqp': + ensure => $ensure, + } + } + collectd::plugin {'amqp': ensure => $ensure, content => template('collectd/plugin/amqp.conf.erb'), diff --git a/manifests/plugin/bind.pp b/manifests/plugin/bind.pp index 51d2bb7d7..5daef2d77 100644 --- a/manifests/plugin/bind.pp +++ b/manifests/plugin/bind.pp @@ -24,6 +24,12 @@ ) validate_array($views) + if $::osfamily == 'Redhat' { + package { 'collectd-bind': + ensure => $ensure, + } + } + collectd::plugin {'bind': ensure => $ensure, content => template('collectd/plugin/bind.conf.erb'), diff --git a/manifests/plugin/curl.pp b/manifests/plugin/curl.pp index da577ad61..cba5a5dfa 100644 --- a/manifests/plugin/curl.pp +++ b/manifests/plugin/curl.pp @@ -4,6 +4,13 @@ $interval = undef, $pages = { }, ) { + + if $::osfamily == 'Redhat' { + package { 'collectd-curl': + ensure => $ensure, + } + } + collectd::plugin {'curl': ensure => $ensure, interval => $interval, diff --git a/manifests/plugin/curl_json.pp b/manifests/plugin/curl_json.pp index 6eb6861ba..b571b4a1f 100644 --- a/manifests/plugin/curl_json.pp +++ b/manifests/plugin/curl_json.pp @@ -11,6 +11,12 @@ include collectd::params validate_hash($keys) + if $::osfamily == 'Redhat' { + package { 'collectd-curl_json': + ensure => $ensure, + } + } + $conf_dir = $collectd::params::plugin_conf_dir # This is deprecated file naming ensuring old style file removed, and should be removed in next major relese diff --git a/manifests/plugin/iptables.pp b/manifests/plugin/iptables.pp index edb3862d1..8e0dd76a0 100644 --- a/manifests/plugin/iptables.pp +++ b/manifests/plugin/iptables.pp @@ -6,6 +6,12 @@ ) { validate_hash($chains) + if $::osfamily == 'Redhat' { + package { 'collectd-iptables': + ensure => $ensure, + } + } + collectd::plugin {'iptables': ensure => $ensure, content => template('collectd/plugin/iptables.conf.erb'), diff --git a/manifests/plugin/mysql.pp b/manifests/plugin/mysql.pp index 8830123f5..4dcd03895 100644 --- a/manifests/plugin/mysql.pp +++ b/manifests/plugin/mysql.pp @@ -3,6 +3,13 @@ class collectd::plugin::mysql ( $interval = undef, ){ + + if $::osfamily == 'Redhat' { + package { 'collectd-mysql': + ensure => $ensure, + } + } + collectd::plugin { 'mysql': interval => $interval, } diff --git a/manifests/plugin/nginx.pp b/manifests/plugin/nginx.pp index cb0fbdc70..b553f0b23 100644 --- a/manifests/plugin/nginx.pp +++ b/manifests/plugin/nginx.pp @@ -10,6 +10,12 @@ $interval = undef, ) { + if $::osfamily == 'Redhat' { + package { 'collectd-nginx': + ensure => $ensure, + } + } + collectd::plugin {'nginx': ensure => $ensure, content => template('collectd/plugin/nginx.conf.erb'), diff --git a/manifests/plugin/perl.pp b/manifests/plugin/perl.pp index 2b8af65e5..6b3824e00 100644 --- a/manifests/plugin/perl.pp +++ b/manifests/plugin/perl.pp @@ -8,6 +8,12 @@ include collectd::params $conf_dir = $collectd::params::plugin_conf_dir + if $::osfamily == 'Redhat' { + package { 'collectd-perl': + ensure => $ensure, + } + } + collectd::plugin { 'perl': ensure => $ensure, globals => true, diff --git a/manifests/plugin/ping.pp b/manifests/plugin/ping.pp index 61127b6e6..88c4411f2 100644 --- a/manifests/plugin/ping.pp +++ b/manifests/plugin/ping.pp @@ -12,6 +12,12 @@ validate_array($hosts) + if $::osfamily == 'Redhat' { + package { 'collectd-ping': + ensure => $ensure, + } + } + $conf_dir = $collectd::params::plugin_conf_dir file { diff --git a/manifests/plugin/postgresql.pp b/manifests/plugin/postgresql.pp index e3f7b21ca..0930346ae 100644 --- a/manifests/plugin/postgresql.pp +++ b/manifests/plugin/postgresql.pp @@ -8,6 +8,12 @@ ) { include collectd::params + if $::osfamily == 'Redhat' { + package { 'collectd-postgresql': + ensure => $ensure, + } + } + collectd::plugin {'postgresql': ensure => $ensure, interval => $interval, diff --git a/manifests/plugin/python.pp b/manifests/plugin/python.pp index 2c2c3919f..5e0cbe801 100644 --- a/manifests/plugin/python.pp +++ b/manifests/plugin/python.pp @@ -11,6 +11,12 @@ validate_hash($config) + if $::osfamily == 'Redhat' { + package { 'collectd-python': + ensure => $ensure, + } + } + $conf_dir = $collectd::params::plugin_conf_dir # This is deprecated file naming ensuring old style file removed, and should be removed in next major relese diff --git a/manifests/plugin/sensors.pp b/manifests/plugin/sensors.pp index acc4f31fe..a85421db5 100644 --- a/manifests/plugin/sensors.pp +++ b/manifests/plugin/sensors.pp @@ -7,6 +7,12 @@ $interval = undef, ) { + if $::osfamily == 'Redhat' { + package { 'collectd-sensors': + ensure => $ensure, + } + } + collectd::plugin {'sensors': ensure => $ensure, content => template('collectd/plugin/sensors.conf.erb'), diff --git a/manifests/plugin/snmp.pp b/manifests/plugin/snmp.pp index 1c4b43ca3..c476760c5 100644 --- a/manifests/plugin/snmp.pp +++ b/manifests/plugin/snmp.pp @@ -7,6 +7,12 @@ ) { validate_hash($data, $hosts) + if $::osfamily == 'Redhat' { + package { 'collectd-snmp': + ensure => $ensure, + } + } + collectd::plugin {'snmp': ensure => $ensure, content => template('collectd/plugin/snmp.conf.erb'), diff --git a/manifests/plugin/varnish.pp b/manifests/plugin/varnish.pp index 1aeb9c74a..e2b1f5d00 100644 --- a/manifests/plugin/varnish.pp +++ b/manifests/plugin/varnish.pp @@ -13,7 +13,7 @@ if $::osfamily == 'Redhat' { package { 'collectd-varnish': - ensure => installed + ensure => $ensure, } } diff --git a/manifests/plugin/write_http.pp b/manifests/plugin/write_http.pp index 3497071bf..cfa5e7942 100644 --- a/manifests/plugin/write_http.pp +++ b/manifests/plugin/write_http.pp @@ -7,6 +7,12 @@ validate_hash($urls) + if $::osfamily == 'Redhat' { + package { 'collectd-write_http': + ensure => $ensure, + } + } + collectd::plugin {'write_http': ensure => $ensure, content => template('collectd/plugin/write_http.conf.erb'), diff --git a/manifests/plugin/write_riemann.pp b/manifests/plugin/write_riemann.pp index 95dd7d969..b85b2c352 100644 --- a/manifests/plugin/write_riemann.pp +++ b/manifests/plugin/write_riemann.pp @@ -11,6 +11,12 @@ validate_bool($store_rates) validate_bool($always_append_ds) + if $::osfamily == 'Redhat' { + package { 'collectd-write_riemann': + ensure => $ensure, + } + } + collectd::plugin {'write_riemann': ensure => $ensure, content => template('collectd/plugin/write_riemann.conf.erb'),