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