OP#189 add the services
This commit is contained in:
10
templates/prometheus-orune-timer.erb
Normal file
10
templates/prometheus-orune-timer.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run Prometheus TSDB prune script every 6 hours
|
||||
|
||||
[Timer]
|
||||
OnBootSec=10min
|
||||
OnUnitActiveSec=6h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
13
templates/prometheus-prune-service.erb
Normal file
13
templates/prometheus-prune-service.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Prometheus TSDB prune service
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=prometheus
|
||||
Group=prometheus
|
||||
EnvironmentFile=<%= @ps_env_file %>
|
||||
ExecStart=<%= @ps_pruning_file %>
|
||||
Nice=10
|
||||
IOWeight=80
|
||||
Reference in New Issue
Block a user