Skip to main content
Loading

Starting the Monitoring Stack components

After you configure Aerospike Prometheus Exporter, Prometheus, and Grafana server, follow these steps to start them.

Start the Aerospike Prometheus Exporter

On the system where the Exporter is installed, run this command:

systemctl start aerospike-prometheus-exporter.service

Start Prometheus

You can run Prometheus in two ways:

Run the binary file directly

Assuming the binary is located at /usr/local/bin/prometheus, run this command:

/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml \
--storage.tsdb.path /var/lib/prometheus/

Run Prometheus as a service

Create a systemd unit file.

Create the file /usr/lib/systemd/system/prometheus.service and include this content:

# cat /usr/lib/systemd/system/prometheus.service

[Unit]
Description=Prometheus Service
Documentation=https://prometheus.io/docs/introduction/overview/
Wants=network.target
After=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 by running this command:

systemctl daemon-reload

Start Prometheus by running this command:

systemctl start prometheus.service

Start Grafana server

Start Grafana server by running this command:

systemctl start grafana-server