February 2018
Beginner
290 pages
7h 28m
English
Once this is complete, Prometheus is technically installed and ready to be started. However, we will create a systemd file to start and stop the Prometheus service so that we can use the systemctl commands:
sudo su cat <<EOF >> /etc/systemd/system/prometheus.service[Unit]Description=PrometheusWants=network-online.targetAfter=network-online.target[Service]User=prometheusGroup=prometheusType=simpleExecStart=/usr/local/bin/prometheus \ --config.file /etc/prometheus/prometheus.yml \ --storage.tsdb.path /var/lib/prometheus/ \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/console_libraries[Install]WantedBy=multi-user.targetEOFexit
The preceding code simply mentions that the ...
Read now
Unlock full access