Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collectd::plugin::oracle - Use data types #776

Merged
merged 1 commit into from Apr 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions manifests/plugin/oracle.pp
@@ -1,13 +1,14 @@
# Oracle plugin
# https://collectd.org/wiki/index.php/Plugin:Oracle
class collectd::plugin::oracle (
$ensure = 'present',
$manage_package = undef,
$interval = undef,
Enum['present', 'absent'] $ensure = 'present',
Boolean $manage_package = false,
Optional[Integer[1]] $interval = undef,
) {

include ::collectd

$config_file = "${collectd::plugin_conf_dir}/15-oracle.conf"
$conf_dir = $collectd::plugin_conf_dir

if $manage_package {
package { 'collectd-oracle':
Expand All @@ -20,7 +21,7 @@
interval => $interval,
}

concat { $config_file:
concat { "${conf_dir}/15-oracle.conf":
ensure => $ensure,
mode => $collectd::config_mode,
owner => $collectd::config_owner,
Expand All @@ -33,10 +34,13 @@
'collectd_plugin_oracle_conf_header':
order => '00',
content => '<Plugin oracle>',
target => $config_file;
target => "${conf_dir}/15-oracle.conf",
}

concat::fragment {
'collectd_plugin_oracle_conf_footer':
order => '99',
content => '</Plugin>',
target => $config_file;
target => "${conf_dir}/15-oracle.conf",
}
}
4 changes: 3 additions & 1 deletion manifests/plugin/oracle/database.pp
Expand Up @@ -10,9 +10,11 @@
include ::collectd
include ::collectd::plugin::oracle

$conf_dir = $collectd::plugin_conf_dir

concat::fragment { "collectd_plugin_oracle_database_${name}":
order => '20',
content => template('collectd/plugin/oracle/database.conf.erb'),
target => $collectd::plugin::oracle::config_file,
target => "${conf_dir}/15-oracle.conf",
}
}
4 changes: 3 additions & 1 deletion manifests/plugin/oracle/query.pp
Expand Up @@ -8,9 +8,11 @@
include ::collectd
include ::collectd::plugin::oracle

$conf_dir = $collectd::plugin_conf_dir

concat::fragment { "collectd_plugin_oracle_query_${name}":
order => '10',
content => template('collectd/plugin/oracle/query.conf.erb'),
target => $collectd::plugin::oracle::config_file,
target => "${conf_dir}/15-oracle.conf",
}
}