Quick installation using Docker containers
Prerequisites
- If you want to monitor an instance of Aerospike Database Enterprise Edition, but you don't already have an instance deployed, see "Install Aerospike" for deployment instructions for your platform.
- If you want to monitor an Aerospike outbound connector, but you do not have an instance deployed, see "Streaming Data from Aerospike" for deployment instructions.
Run Aerospike Prometheus Exporter
Aerospike provides docker images for the Aerospike Prometheus Exporter on Docker Hub.
Run Aerospike Prometheus Exporter and connect to an Aerospike database. This example command assumes that the Aerospike database was deployed in a container named aerospike
on the same system and where the aerospike
container is running.
docker run -itd --name exporter --link="aerospike" -e AS_HOST=aerospike -e AS_PORT=3000 -e METRIC_LABELS="type='development',source='aerospike'" -p 9145:9145 aerospike/aerospike-prometheus-exporter:latest
OK
AS_HOST
- The IP address of a node of the Aerospike databaseAS_PORT
- The client-access port for the database
Run Prometheus
Run a Prometheus container and configure the exporter as a scrape target.
Create prometheus.yml with this content:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'aerospike'
static_configs:
- targets: ['exporter:9145']
docker run -tid --name prometheus --link="exporter" -p 9090:9090 -v <Path_of_prometheus.yml>:/etc/prometheus/prometheus.yml prom/prometheus:latest
View metrics on Prometheus dashboard at http://localhost:9090.
Run Grafana
These steps that describe how to run Grafana in a Docker container are only the basic steps. For more detailed steps (?), see "Run Grafana Docker image" in the Grafana documentation.
docker run -d --name grafana -p 3003:3000 grafana/grafana
Run http://localhost:3003/
Aerospike is already bound to port 3000; you must bind Grafana's default port (3003) to a different port. ASDB takes 3000, 3001, and 3002. It will bind to 3003.
You can import Dashboards for monitoring your Aerospike database from here.