[Unit] Description=Prometheus After=network-online.target [Service] Type=simple User=jingrow Group=jingrow PIDFile=/var/run/prometheus.pid ExecReload=/bin/kill -HUP $MAINPID ExecStart=/home/jingrow/prometheus/prometheus \ --config.file=/home/jingrow/prometheus/prometheus.yml \ --enable-feature=promql-negative-offset \ --query.timeout=10m \ --query.max-concurrency=50 \ --storage.tsdb.path={{ prometheus_data_directory }} \ --storage.tsdb.retention.time=180d \ --web.console.libraries=/home/jingrow/prometheus/console_libraries \ --web.console.templates=/home/jingrow/prometheus/consoles \ --web.listen-address=127.0.0.1:9090 \ --web.external-url=https://{{ server }}/prometheus SyslogIdentifier=prometheus Restart=always RestartSec=1 StartLimitInterval=0 LimitNOFILE=1024000 LimitNOFILESoft=102400 [Install] WantedBy=multi-user.target