Skip to content

Commit

Permalink
Merge pull request #175 from voxpupuli/datatypes
Browse files Browse the repository at this point in the history
Add Datatypes to all parameters
  • Loading branch information
bastelfreak authored Mar 18, 2018
2 parents 480f8c4 + 6ad5e42 commit a9a60df
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 194 deletions.
64 changes: 32 additions & 32 deletions manifests/alertmanager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -129,38 +129,38 @@
# [*version*]
# The binary release version
class prometheus::alertmanager (
$arch = $::prometheus::params::arch,
$bin_dir = $::prometheus::params::bin_dir,
$config_dir = $::prometheus::params::alertmanager_config_dir,
$config_file = $::prometheus::params::alertmanager_config_file,
$config_mode = $::prometheus::params::config_mode,
$download_extension = $::prometheus::params::alertmanager_download_extension,
$download_url = undef,
$download_url_base = $::prometheus::params::alertmanager_download_url_base,
$extra_groups = $::prometheus::params::alertmanager_extra_groups,
$extra_options = '',
Hash $global = $::prometheus::params::alertmanager_global,
$group = $::prometheus::params::alertmanager_group,
Array $inhibit_rules = $::prometheus::params::alertmanager_inhibit_rules,
$init_style = $::prometheus::params::init_style,
$install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
$os = $::prometheus::params::os,
$package_ensure = $::prometheus::params::alertmanager_package_ensure,
$package_name = $::prometheus::params::alertmanager_package_name,
Boolean $purge_config_dir = true,
Array $receivers = $::prometheus::params::alertmanager_receivers,
Boolean $restart_on_change = true,
Hash $route = $::prometheus::params::alertmanager_route,
Boolean $service_enable = true,
$service_ensure = 'running',
$service_name = 'alertmanager',
$storage_path = $::prometheus::params::alertmanager_storage_path,
Array $templates = $::prometheus::params::alertmanager_templates,
$user = $::prometheus::params::alertmanager_user,
$version = $::prometheus::params::alertmanager_version,
String $arch = $::prometheus::params::arch,
Stdlib::Absolutepath $bin_dir = $::prometheus::params::bin_dir,
Stdlib::Absolutepath $config_dir = $::prometheus::params::alertmanager_config_dir,
Stdlib::Absolutepath $config_file = $::prometheus::params::alertmanager_config_file,
String $config_mode = $::prometheus::params::config_mode,
String $download_extension = $::prometheus::params::alertmanager_download_extension,
Optional[String] $download_url = undef,
Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $download_url_base = $::prometheus::params::alertmanager_download_url_base,
Array $extra_groups = $::prometheus::params::alertmanager_extra_groups,
String $extra_options = '',
Hash $global = $::prometheus::params::alertmanager_global,
String $group = $::prometheus::params::alertmanager_group,
Array $inhibit_rules = $::prometheus::params::alertmanager_inhibit_rules,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::alertmanager_package_ensure,
String $package_name = $::prometheus::params::alertmanager_package_name,
Boolean $purge_config_dir = true,
Array $receivers = $::prometheus::params::alertmanager_receivers,
Boolean $restart_on_change = true,
Hash $route = $::prometheus::params::alertmanager_route,
Boolean $service_enable = true,
String $service_ensure = 'running',
String $service_name = 'alertmanager',
Stdlib::Absolutepath $storage_path = $::prometheus::params::alertmanager_storage_path,
Array $templates = $::prometheus::params::alertmanager_templates,
String $user = $::prometheus::params::alertmanager_user,
String $version = $::prometheus::params::alertmanager_version,
) inherits prometheus::params {

if( versioncmp($::prometheus::alertmanager::version, '0.3.0') == -1 ){
Expand Down
14 changes: 7 additions & 7 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Class prometheus::config
# Configuration class for prometheus monitoring system
class prometheus::config (
$global_config,
$rule_files,
$scrape_configs,
$remote_read_configs,
$remote_write_configs,
$config_template = $::prometheus::params::config_template,
$storage_retention = $::prometheus::params::storage_retention,
Hash $global_config,
Array $rule_files,
Array $scrape_configs,
Array $remote_read_configs,
Array $remote_write_configs,
String $config_template = $::prometheus::params::config_template,
String $storage_retention = $::prometheus::params::storage_retention,
) {

if $prometheus::init_style {
Expand Down
41 changes: 20 additions & 21 deletions manifests/daemon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,27 @@
# Should puppet manage the service? (default true)
#
define prometheus::daemon (
$version,
$real_download_url,
String $version,
Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl] $real_download_url,
$notify_service,
$user,
$group,

$install_method = $::prometheus::params::install_method,
$download_extension = $::prometheus::params::download_extension,
$os = $::prometheus::params::os,
$arch = $::prometheus::params::arch,
$bin_dir = $::prometheus::params::bin_dir,
$package_name = undef,
$package_ensure = 'installed',
$manage_user = true,
$extra_groups = [],
$manage_group = true,
$purge = true,
$options = '',
$init_style = $::prometheus::params::init_style,
$service_ensure = 'running',
$service_enable = true,
$manage_service = true,
String $user,
String $group,
String $install_method = $::prometheus::params::install_method,
String $download_extension = $::prometheus::params::download_extension,
String $os = $::prometheus::params::os,
String $arch = $::prometheus::params::arch,
Stdlib::Absolutepath $bin_dir = $::prometheus::params::bin_dir,
Optional[String] $package_name = undef,
String $package_ensure = 'installed',
Boolean $manage_user = true,
Array $extra_groups = [],
Boolean $manage_group = true,
Boolean $purge = true,
String $options = '',
String $init_style = $::prometheus::params::init_style,
String $service_ensure = 'running',
Boolean $service_enable = true,
Boolean $manage_service = true,
Hash[String, Scalar] $env_vars = {},
Optional[String] $env_file_path = $::prometheus::params::env_file_path,
) {
Expand Down
32 changes: 16 additions & 16 deletions manifests/haproxy_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@
# [*version*]
# The binary release version
class prometheus::haproxy_exporter(
$arch = $::prometheus::params::arch,
$bin_dir = $::prometheus::params::bin_dir,
$cnf_scrape_uri = $::prometheus::params::haproxy_exporter_cnf_scrape_uri,
$download_extension = $::prometheus::params::haproxy_exporter_download_extension,
$download_url = undef,
$download_url_base = $::prometheus::params::haproxy_exporter_download_url_base,
$extra_groups = $::prometheus::params::haproxy_exporter_extra_groups,
$extra_options = '',
$group = $::prometheus::params::haproxy_exporter_group,
$init_style = $::prometheus::params::init_style,
$install_method = $::prometheus::params::install_method,
String $arch = $::prometheus::params::arch,
Stdlib::Absolutepath $bin_dir = $::prometheus::params::bin_dir,
Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $cnf_scrape_uri = $::prometheus::params::haproxy_exporter_cnf_scrape_uri,
String $download_extension = $::prometheus::params::haproxy_exporter_download_extension,
Optional[String] $download_url = undef,
Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $download_url_base = $::prometheus::params::haproxy_exporter_download_url_base,
Array $extra_groups = $::prometheus::params::haproxy_exporter_extra_groups,
String $extra_options = '',
String $group = $::prometheus::params::haproxy_exporter_group,
String $init_style = $::prometheus::params::init_style,
String $install_method = $::prometheus::params::install_method,
Boolean $manage_group = true,
Boolean $manage_service = true,
Boolean $manage_user = true,
$os = $::prometheus::params::os,
$package_ensure = $::prometheus::params::haproxy_exporter_package_ensure,
$package_name = $::prometheus::params::haproxy_exporter_package_name,
String $os = $::prometheus::params::os,
String $package_ensure = $::prometheus::params::haproxy_exporter_package_ensure,
String $package_name = $::prometheus::params::haproxy_exporter_package_name,
Boolean $purge_config_dir = true,
Boolean $restart_on_change = true,
Boolean $service_enable = true,
$service_ensure = 'running',
$user = $::prometheus::params::haproxy_exporter_user,
$version = $::prometheus::params::haproxy_exporter_version,
String $user = $::prometheus::params::haproxy_exporter_user,
String $version = $::prometheus::params::haproxy_exporter_version,
) inherits prometheus::params {

$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down
78 changes: 39 additions & 39 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -129,45 +129,45 @@
# Sample Usage:
#
class prometheus (
Boolean $manage_user = true,
$user = $::prometheus::params::user,
$manage_group = true,
Boolean $purge_config_dir = true,
$group = $::prometheus::params::group,
$extra_groups = $::prometheus::params::extra_groups,
$bin_dir = $::prometheus::params::bin_dir,
$shared_dir = $::prometheus::params::shared_dir,
$arch = $::prometheus::params::arch,
$version = $::prometheus::params::version,
$install_method = $::prometheus::params::prometheus_install_method,
$os = $::prometheus::params::os,
$download_url = undef,
$download_url_base = $::prometheus::params::download_url_base,
$download_extension = $::prometheus::params::download_extension,
$package_name = $::prometheus::params::package_name,
$package_ensure = $::prometheus::params::package_ensure,
String $config_dir = $::prometheus::params::config_dir,
$localstorage = $::prometheus::params::localstorage,
$extra_options = '',
Hash $config_hash = {},
Hash $config_defaults = {},
$config_template = $::prometheus::params::config_template,
$config_mode = $::prometheus::params::config_mode,
$service_enable = true,
$service_ensure = 'running',
Boolean $manage_service = true,
Boolean $restart_on_change = true,
$init_style = $::prometheus::params::init_style,
Hash $global_config = $::prometheus::params::global_config,
Array $rule_files = $::prometheus::params::rule_files,
Array $scrape_configs = $::prometheus::params::scrape_configs,
Array $remote_read_configs = $::prometheus::params::remote_read_configs,
Array $remote_write_configs = $::prometheus::params::remote_write_configs,
Variant[Array,Hash] $alerts = $::prometheus::params::alerts,
Hash $extra_alerts = {},
Array $alert_relabel_config = $::prometheus::params::alert_relabel_config,
Array $alertmanagers_config = $::prometheus::params::alertmanagers_config,
String $storage_retention = $::prometheus::params::storage_retention,
Boolean $manage_user = true,
String $user = $::prometheus::params::user,
Boolean $manage_group = true,
Boolean $purge_config_dir = true,
String $group = $::prometheus::params::group,
Array $extra_groups = $::prometheus::params::extra_groups,
Stdlib::Absolutepath $bin_dir = $::prometheus::params::bin_dir,
Stdlib::Absolutepath $shared_dir = $::prometheus::params::shared_dir,
String $arch = $::prometheus::params::arch,
String $version = $::prometheus::params::version,
String $install_method = $::prometheus::params::prometheus_install_method,
String $os = $::prometheus::params::os,
Optional[String] $download_url = undef,
Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $download_url_base = $::prometheus::params::download_url_base,
String $download_extension = $::prometheus::params::download_extension,
String $package_name = $::prometheus::params::package_name,
String $package_ensure = $::prometheus::params::package_ensure,
String $config_dir = $::prometheus::params::config_dir,
Stdlib::Absolutepath $localstorage = $::prometheus::params::localstorage,
String $extra_options = '',
Hash $config_hash = {},
Hash $config_defaults = {},
String $config_template = $::prometheus::params::config_template,
String $config_mode = $::prometheus::params::config_mode,
Boolean $service_enable = true,
String $service_ensure = 'running',
Boolean $manage_service = true,
Boolean $restart_on_change = true,
String $init_style = $::prometheus::params::init_style,
Hash $global_config = $::prometheus::params::global_config,
Array $rule_files = $::prometheus::params::rule_files,
Array $scrape_configs = $::prometheus::params::scrape_configs,
Array $remote_read_configs = $::prometheus::params::remote_read_configs,
Array $remote_write_configs = $::prometheus::params::remote_write_configs,
Variant[Array,Hash] $alerts = $::prometheus::params::alerts,
Hash $extra_alerts = {},
Array $alert_relabel_config = $::prometheus::params::alert_relabel_config,
Array $alertmanagers_config = $::prometheus::params::alertmanagers_config,
String $storage_retention = $::prometheus::params::storage_retention,
) inherits prometheus::params {

if( versioncmp($::prometheus::version, '1.0.0') == -1 ){
Expand Down
Loading

0 comments on commit a9a60df

Please sign in to comment.