Aerospike metrics in Cloud
Aerospike Prometheus Exporter
Every Aerospike Cloud database exposes metrics from each Aerospike node. Aerospike Cloud runs the Aerospike Prometheus Exporter alongside each Aerospike node. Aerospike Prometheus Exporter collects metrics from each Aerospike node and exports those metrics on port 9145 at the same database hostname as the Aerospike database.
See details about the Aerospike Prometheus Exporter and the Aerospike monitoring stack here: https://aerospike.com/docs/database/observe/monitor/components
Collect Aerospike Metrics
For Aerospike database clusters running on Aerospike Cloud, metrics can be collected with the following steps:
Prerequisites
- Assumes the following steps below are executed within the AWS VPC that is peered with the Aerospike Cloud database VPC. See VPC-Peering documentation to configure VPC peering.
- Assumes there is a Prometheus server running within the customer AWS VPC that can collect metrics.
Steps for Collecting Aerospike metrics
-
Get the Aerospike Cloud database hostname from the Aerospike Cloud Console.
-
Optional step: Test that metrics can be collected by running the following command:
This command will only return metrics from the first node it resolves and is intended only as a test.
Terminal window curl <database-hostname>:9145/metricsFor example, if the database hostname is
0ecf039f-4abe-472d-aaf9-d99e55aa9f3a.aerospike.internal
Terminal window curl 0ecf039f-4abe-472d-aaf9-d99e55aa9f3a.aerospike.internal:9145/metricsThis command should return a list of the Aerospike metrics in Prometheus metric format. See the Aerospike metrics docs for a full list of Aerospike metrics here.
-
Configure a Prometheus server scrape config to collect metrics from the database hostname at port 9145 and path
/metrics
.The database hostname resolves to an A record for each Aerospike node which means the database hostname returns many host targets. When collectiong metrics with Prometheus use the
dns_sd_config
scrape config. For config details see: Prometheus docs.Terminal window # prometheus config filescrape_configs:- job_name: aerospikemetrics_path: /metricsscheme: httpscrape_interval: 30sdns_sd_configs:- names:- <database hostname>type: Aport: 9145