Deploy `/etc/systemd/system/prometheus.service`.

This commit is contained in:
Kazuhiro MUSASHI 2023-02-11 21:32:07 +09:00
parent a8b8c6b6e2
commit 1bf6c47e99
2 changed files with 15 additions and 6 deletions

View File

@ -0,0 +1,7 @@
# Log kernel generated digdag log messages to file
:syslogtag,contains,"prometheus" /var/log/prometheus.log
# Uncomment the following to stop logging anything that matches the last rule.
# Doing this will stop logging kernel generated UFW log messages to the file
# normally containing kern.* messages (eg, /var/log/kern.log)
& stop

View File

@ -8,7 +8,7 @@ end
%w(/etc/prometheus.d).each do |d|
directory d do
owner 'prometheus'
group 'promtheus'
group 'prometheus'
mode '0755'
end
end
@ -20,13 +20,15 @@ remote_file '/etc/prometheus.d/prometheus.yml' do
mode '644'
end
# Deploy `supervisor` configuration for `prometheus`:
remote_file '/etc/supervisor/conf.d/prometheus.conf' do
owner 'prometheus'
group 'prometheus'
# Deploy `systemd` configuration for `prometheus`:
remote_file '/etc/systemd/system/prometheus.service' do
owner 'root'
group 'root'
mode '644'
end
notifies :restart, 'service[supervisor]'
service 'prometheus' do
action [:enable, :start]
end
# Depoy `consul` service configuration for `prometheus`: