Skip to content

Commit

Permalink
Merge pull request #1 from martin-koerner/alertmanager_service_name
Browse files Browse the repository at this point in the history
Add service_name parameter for alertmanager
  • Loading branch information
martin-koerner authored May 30, 2017
2 parents acaa7ff + 566bed3 commit 076d8ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions manifests/alertmanager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
# [*service_ensure*]
# State ensured for the service (default 'running')
#
# [*service_name*]
# Name of the alertmanager service (default 'alertmanager')
#
# [*storage_path*]
# The storage path to pass to the alertmanager. Defaults to '/var/lib/alertmanager'
#
Expand Down Expand Up @@ -153,6 +156,7 @@
$route = $::prometheus::params::alertmanager_route,
$service_enable = true,
$service_ensure = 'running',
$service_name = 'alertmanager',
$storage_path = $::prometheus::params::alertmanager_storage_path,
$templates = $::prometheus::params::alertmanager_templates,
$user = $::prometheus::params::alertmanager_user,
Expand All @@ -175,7 +179,7 @@
validate_hash($global)
validate_hash($route)
$notify_service = $restart_on_change ? {
true => Service['alertmanager'],
true => Service[$service_name],
default => undef,
}

Expand Down Expand Up @@ -214,7 +218,7 @@
$options = "-config.file=${prometheus::alertmanager::config_file} ${prometheus::alertmanager::extra_options}"
}

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

0 comments on commit 076d8ac

Please sign in to comment.