076869a8cd
Centos and oraclelinux repositories for prometheus include bespoke headers in the environment files (e.g. Debian: ARGS=, Centos: PROMETHEUS_OPTS= ALERTMANAGER_OPTS=). This has been added as a default pillar with osmap variances. Additionally archlinux repo install was failing so added basic support - an issue still remains for the prometheus app itself due to the service file included in the arch repo hardcoding some config options - resulting in the possibility to duplicate arguments resulting in a service error. The prometheus service currently does not start due to permissions not being applied to a data folder. The added config.storage begins to solve this and ensures alignment on all platforms but would result in a duplicate config entry as above. Prometheus on arch therefore needs more work but the exporter installs now work. Resolves: #59
37 lines
628 B
Ruby
37 lines
628 B
Ruby
# frozen_string_literal: true
|
|
|
|
control 'prometheus packages' do
|
|
title 'should be installed'
|
|
|
|
packages =
|
|
case platform[:family]
|
|
when 'redhat'
|
|
%w[
|
|
prometheus2
|
|
alertmanager
|
|
node_exporter
|
|
]
|
|
when 'linux'
|
|
case platform[:name]
|
|
when 'arch'
|
|
%w[
|
|
prometheus
|
|
alertmanager
|
|
prometheus-node-exporter
|
|
]
|
|
end
|
|
else
|
|
%w[
|
|
prometheus
|
|
prometheus-alertmanager
|
|
prometheus-node-exporter
|
|
]
|
|
end
|
|
|
|
packages.each do |p|
|
|
describe package(p) do
|
|
it { should be_installed }
|
|
end
|
|
end
|
|
end
|