31 lines
880 B
SYSTEMD
31 lines
880 B
SYSTEMD
|
[Unit]
|
||
|
Description=Prometheus
|
||
|
Wants=network-online.target
|
||
|
After=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
User=prometheus
|
||
|
Group=prometheus
|
||
|
Type=simple
|
||
|
Restart=always
|
||
|
OOMScoreAdjust=-1000
|
||
|
LimitNOFILE=16384
|
||
|
ExecStart=/usr/sbin/prometheus \
|
||
|
--config.file /etc/prometheus/prometheus.yaml \
|
||
|
--web.config.file=/etc/prometheus/web-config.yaml \
|
||
|
--storage.tsdb.path /prometheus-data/ \
|
||
|
--storage.tsdb.retention.time 180d \
|
||
|
--storage.tsdb.max-block-duration=2h \
|
||
|
--storage.tsdb.min-block-duration=2h \
|
||
|
--web.enable-remote-write-receiver \
|
||
|
--web.console.templates=/etc/prometheus/consoles \
|
||
|
--web.console.libraries=/etc/prometheus/console_libraries \
|
||
|
--web.enable-admin-api \
|
||
|
--query.max-samples=50000000
|
||
|
|
||
|
ExecReload=/usr/bin/kill -s HUP $MAINPID
|
||
|
ExecStop=/usr/bin/kill -s QUIT $MAINPID
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|