this is my systemd file ``` [Unit] After=network.target Description=prometheus server Documentation=http://prometheus.io
[Service] User=prometheus Type=simple EnvironmentFile=/etc/sysconfig/prometheus ExecStart=/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml $EXTRA_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartSec=10 SuccessExitStatus=0 LimitNOFILE=3000000 [Install] WantedBy=multi-user.target ``` Notice this is for centos/rhel, by the standard the environment files are under `/etc/default/prometheus` for debian based OSs, the file should contain the rest of the config (tsdb path web address and port etc) Drop this as /usr/lib/systemd/system/prometheus.service and run `systemctl enable prometheus` On Thursday, September 17, 2020 at 8:12:05 AM UTC+2 Amari CH wrote: > Currently I just nohup run the processes in backend, this is ugly. > I am using ubuntu 18.04 system, how to make those processes to > start/stop as system daemons? > > Thank you. > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/e7060fed-ef99-45e2-8d30-d2baeff75bd4n%40googlegroups.com.