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

Alertmanager configuration is not checked when installed from RPM #592

Closed
roidelapluie opened this issue Nov 17, 2021 · 0 comments · Fixed by #593
Closed

Alertmanager configuration is not checked when installed from RPM #592

roidelapluie opened this issue Nov 17, 2021 · 0 comments · Fixed by #593

Comments

@roidelapluie
Copy link
Member

if (( versioncmp($version, '0.10.0') >= 0 ) and ( $install_method == 'url' )) {
# If version >= 0.10.0 then install amtool - Alertmanager validation tool
file { "${bin_dir}/amtool":
ensure => link,
target => "/opt/${package_name}-${version}.${os}-${arch}/amtool",
}
if $manage_config {
file { $config_file:
ensure => file,
owner => 'root',
group => $group,
mode => $config_mode,
content => template('prometheus/alertmanager.yaml.erb'),
notify => $_notify_service,
require => File["${bin_dir}/amtool", $config_dir],
validate_cmd => "${bin_dir}/amtool check-config --alertmanager.url='' %",
}
}
} else {
if $manage_config {
file { $config_file:
ensure => file,
owner => 'root',
group => $group,
mode => $config_mode,
content => template('prometheus/alertmanager.yaml.erb'),
notify => $_notify_service,
require => File[$config_dir],
}
}
}

When the install method is not URL, amtool is not called. We should still call it, or at least have a flag to call the amtool command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant