[Unit] Description=Prometheus Monitoring System Documentation=https://prometheus.io/docs/ Wants=network-online.target After=network-online.target [Service] Type=simple User=monitoring Group=monitoring ExecReload=/bin/kill -HUP $MAINPID ExecStart=/usr/local/bin/prometheus \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/var/lib/prometheus \ --storage.tsdb.retention.time=15d \ --web.listen-address=0.0.0.0:9090 \ --web.enable-lifecycle \ --log.level=info SyslogIdentifier=prometheus Restart=always RestartSec=5 # Hardening NoNewPrivileges=true ProtectSystem=full ProtectHome=true [Install] WantedBy=multi-user.target