Skip to content

Commit

Permalink
fix service name for apache exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
anarcat committed Mar 19, 2019
1 parent 5fc21b3 commit b8de306
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ prometheus::node_exporter::package_name: 'prometheus-node-exporter'
prometheus::node_exporter::service_name: 'prometheus-node-exporter'
prometheus::node_exporter::group: 'prometheus'
prometheus::node_exporter::user: 'prometheus'
prometheus::apache_exporter::service_name: 'prometheus-apache-exporter'
prometheus::configname: 'prometheus.yml'
prometheus::server::user: 'root'
prometheus::server::group: 'root'
5 changes: 3 additions & 2 deletions manifests/apache_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
Boolean $restart_on_change = true,
Boolean $service_enable = true,
String[1] $service_ensure = 'running',
String $service_name = 'apache_exporter',
String[1] $init_style = $prometheus::init_style,
String[1] $install_method = $prometheus::install_method,
Boolean $manage_group = true,
Expand All @@ -105,13 +106,13 @@
#Please provide the download_url for versions < 0.9.0
$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['apache_exporter'],
true => Service[$service_name],
default => undef,
}

$options = "-scrape_uri \"${scrape_uri}\" ${extra_options}"

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

0 comments on commit b8de306

Please sign in to comment.