Skip to content

Commit fbfea38

Browse files
authored
Ensure that prometheus data directory exists, prometheus does not create (#9)
1 parent f44bdb5 commit fbfea38

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cookbooks/boxcutter_prometheus/recipes/prometheus.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@
6363
notifies :reload, 'service[prometheus]'
6464
end
6565

66-
directory '/var/lib/prometheus' do
67-
owner 'prometheus'
68-
group 'prometheus'
69-
mode '0755'
66+
%w{
67+
/var/lib/prometheus
68+
/var/lib/prometheus/data
69+
}.each do |dir|
70+
directory dir do
71+
owner 'prometheus'
72+
group 'prometheus'
73+
mode '0755'
74+
end
7075
end
7176

7277
template '/etc/systemd/system/prometheus.service' do

0 commit comments

Comments
 (0)