Files
ansible-repo/files/prometheus/prometheus.service
hogweed1 d1528c8e31
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
make prometheus less big
2026-06-11 00:21:28 +10:00

32 lines
922 B
Desktop File

[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.retention.size 35GB \
--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