Skip to content

Commit

Permalink
Merge pull request redhat-openstack#223 from sijis/add_packages
Browse files Browse the repository at this point in the history
Add redhat packages on plugins
  • Loading branch information
blkperl committed Jan 9, 2015
2 parents a3202b0 + 06ad3cd commit 1990227
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 1 deletion.
6 changes: 6 additions & 0 deletions manifests/plugin/amqp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/bind.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
7 changes: 7 additions & 0 deletions manifests/plugin/curl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
$interval = undef,
$pages = { },
) {

if $::osfamily == 'Redhat' {
package { 'collectd-curl':
ensure => $ensure,
}
}

collectd::plugin {'curl':
ensure => $ensure,
interval => $interval,
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/curl_json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/iptables.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
7 changes: 7 additions & 0 deletions manifests/plugin/mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
class collectd::plugin::mysql (
$interval = undef,
){

if $::osfamily == 'Redhat' {
package { 'collectd-mysql':
ensure => $ensure,
}
}

collectd::plugin { 'mysql':
interval => $interval,
}
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/nginx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/perl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/ping.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

validate_array($hosts)

if $::osfamily == 'Redhat' {
package { 'collectd-ping':
ensure => $ensure,
}
}

$conf_dir = $collectd::params::plugin_conf_dir

file {
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/postgresql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
) {
include collectd::params

if $::osfamily == 'Redhat' {
package { 'collectd-postgresql':
ensure => $ensure,
}
}

collectd::plugin {'postgresql':
ensure => $ensure,
interval => $interval,
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/python.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/sensors.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/snmp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/varnish.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

if $::osfamily == 'Redhat' {
package { 'collectd-varnish':
ensure => installed
ensure => $ensure,
}
}

Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/write_http.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions manifests/plugin/write_riemann.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 1990227

Please sign in to comment.