Start monitoring stack components
This page describes how to start each of the monitoring stack components after you install and configure them. The components described here include the Aerospike Prometheus Exporter, Prometheus, and the Grafana server.
-
On the system where Prometheus is installed, start the Aerospike Prometheus Exporter with the following command:
systemctl start aerospike-prometheus-exporter.service -
Start Prometheus. We recommend running it as a service, though you can also run it as a binary file.
-
Create a
systemd
unit file. -
Create the file
/usr/lib/systemd/system/prometheus.service
and include the following content:# cat /usr/lib/systemd/system/prometheus.service[Unit]Description=Prometheus ServiceDocumentation=https://prometheus.io/docs/introduction/overview/Wants=network.targetAfter=network-online.target[Service]ExecStart=/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/[Install]WantedBy=multi-user.target -
Reload daemons with the following command:
systemctl daemon-reload -
Start Prometheus with the following command:
systemctl start prometheus.service
Assuming the binary is located at
/usr/local/bin/prometheus
, run the following command:/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml \--storage.tsdb.path /var/lib/prometheus/ -
-
Start the Grafana server with the following command:
systemctl start grafana-server