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

add service_name parameter to elasticsearch-exporter #429

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ prometheus::elasticsearch_exporter::extra_groups: []
prometheus::elasticsearch_exporter::group: 'elasticsearch-exporter'
prometheus::elasticsearch_exporter::package_ensure: 'latest'
prometheus::elasticsearch_exporter::package_name: 'elasticsearch_exporter'
prometheus::elasticsearch_exporter::service_name: 'elasticsearch_exporter'
prometheus::elasticsearch_exporter::user: 'elasticsearch-exporter'
prometheus::elasticsearch_exporter::version: '1.1.0rc1'
prometheus::elasticsearch_exporter::use_kingpin: true
prometheus::elasticsearch_exporter::version: '1.1.0rc1'
prometheus::extra_groups: []
prometheus::global_config:
'scrape_interval': '15s'
Expand Down
7 changes: 5 additions & 2 deletions manifests/elasticsearch_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
# Whether to enable the service from puppet (default true)
# @param service_ensure
# State ensured for the service (default 'running')
# @param service_name
# Name of the elasticsearch exporter service (default 'elasticsearch_exporter')
# @param user
# User which runs the service
# @param version
Expand All @@ -60,6 +62,7 @@
String $group,
String $package_ensure,
String $package_name,
String $service_name,
String $user,
String $version,
Boolean $use_kingpin,
Expand Down Expand Up @@ -87,7 +90,7 @@
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")

$notify_service = $restart_on_change ? {
true => Service['elasticsearch_exporter'],
true => Service[$service_name],
default => undef,
}

Expand All @@ -98,7 +101,7 @@

$options = "${flag_prefix}es.uri=${cnf_uri} ${flag_prefix}es.timeout=${cnf_timeout} ${extra_options}"

prometheus::daemon { 'elasticsearch_exporter':
prometheus::daemon { $service_name:
install_method => $install_method,
version => $version,
download_extension => $download_extension,
Expand Down