Merge pull request 'Alertmanager-webhookのダウンロードファイル名変更に伴う修正' (#74) from modify-alertmanager-webhook-installation into master

Reviewed-on: #74
This commit is contained in:
Kazuhiro MUSASHI 2021-05-04 10:21:15 +09:00
commit db2dfcae84
3 changed files with 4 additions and 24 deletions

View File

@ -2,14 +2,6 @@
# Specifying the default settings:
# -------------------------------------------
node.reverse_merge!({
'prometheus' => {
'manager' => false,
'url' => 'https://github.com/prometheus/prometheus/releases/download/',
'prefix' => 'prometheus-',
'postfix' => '.linux-amd64.tar.gz',
'storage' => '/opt/prometheus/',
'location' => '/usr/local/bin/'
},
'node_exporter' => {
'url' => 'https://github.com/prometheus/node_exporter/releases/download/',
'prefix' => 'node_exporter-',
@ -24,20 +16,6 @@ node.reverse_merge!({
'storage' => '/opt/blackbox_exporter/bin/',
'location' => '/usr/local/bin/'
},
'alertmanager' => {
'url' => 'https://github.com/prometheus/alertmanager/releases/download/',
'prefix' => 'alertmanager-',
'postfix' => '.linux-amd64.tar.gz',
'storage' => '/opt/prometheus/',
'location' => '/usr/local/bin/'
},
'alertmanager_webhook' => {
'url' => 'https://github.com/tomtom-international/alertmanager-webhook-logger/releases/download/',
'prefix' => 'alertmanager-webhook-logger-',
'postfix' => '.tar.gz',
'storage' => '/opt/prometheus/',
'location' => '/usr/local/bin/'
},
'filestat_exporter' => {
'url' => 'https://github.com/michael-doubez/filestat_exporter/releases/download/',
'prefix' => 'filestat_exporter-',

View File

@ -35,7 +35,9 @@ directory node['alertmanager_webhook']['storage'] do
mode '755'
end
execute "tar zxf #{TMP} -C #{node['alertmanager_webhook']['storage']}"
execute "unzip #{TMP} -d #{node['alertmanager_webhook']['storage']}" do
not_if "test -e #{node['alertmanager_webhook']['storage']}alertmanager-webhook-logger"
end
# Change Owner and Permissions:
file "#{node['alertmanager_webhook']['storage']}alertmanager-webhook-logger" do

View File

@ -34,7 +34,7 @@ node.reverse_merge!({
'alertmanager_webhook' => {
'url' => 'https://github.com/tomtom-international/alertmanager-webhook-logger/releases/download/',
'prefix' => 'alertmanager-webhook-logger-',
'postfix' => '.tar.gz',
'postfix' => '.zip',
'storage' => '/opt/prometheus/',
'location' => '/usr/local/bin/'
},