2020-08-24 17:37:06 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
control 'prometheus services' do
|
|
|
|
title 'should be running'
|
|
|
|
|
2020-08-24 23:33:16 +02:00
|
|
|
service =
|
|
|
|
case platform[:family]
|
|
|
|
when 'redhat'
|
|
|
|
'node_exporter'
|
|
|
|
else
|
|
|
|
'prometheus-node-exporter'
|
|
|
|
end
|
|
|
|
|
|
|
|
describe service(service) do
|
2020-08-24 17:37:06 +02:00
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
|
|
|
|
# prometheus-node-exporter port
|
|
|
|
describe port(9100) do
|
|
|
|
it { should be_listening }
|
|
|
|
end
|
|
|
|
end
|