Skip to content

Aerospike Database metrics

For production monitoring and alerting, collect the full set of Prometheus metrics from your Aerospike Cloud cluster. Unlike Cloud Console metrics or Cloud Public API metrics, Aerospike Database metrics give you per-node granularity, the complete metric catalog, and the ability to build custom dashboards and alerts in tools like Grafana.

Each Aerospike Cloud cluster node runs the Aerospike Prometheus Exporter, which collects metrics and exposes them on port 9145 at the same database hostname as the Aerospike database.

Collect Aerospike metrics

Set up Prometheus to scrape metrics from your Aerospike Cloud cluster nodes.

  1. Get the Aerospike Cloud database hostname from the Aerospike Cloud Console.

  2. (Optional) Run the following command to verify that metrics can be collected:

    Terminal window
    curl <database-hostname>:9145/metrics

    For example, if the database hostname is 0ecf039f-4abe-472d-aaf9-d99e55aa9f3a.aerospike.internal:

    Terminal window
    curl 0ecf039f-4abe-472d-aaf9-d99e55aa9f3a.aerospike.internal:9145/metrics

    The command returns a list of Aerospike metrics in Prometheus metric format. See the Metrics Reference for a full list of available metrics.

  3. Configure a Prometheus server to collect metrics from the database hostname on port 9145 and path /metrics.

    The database hostname resolves to an A record for each Aerospike node, meaning the database hostname returns many host targets. When collecting metrics with Prometheus, use the dns_sd_config scrape configuration. For more information, see the Prometheus documentation.

    # prometheus config file
    scrape_configs:
    - job_name: aerospike
    metrics_path: /metrics
    scheme: http
    scrape_interval: 30s
    dns_sd_configs:
    - names:
    DATABASE_HOSTNAME
    type: A
    port: 9145
    metric_relabel_configs:
    - target_label: cluster_name
    replacement: CLUSTER_NAME

    Replace CLUSTER_NAME with the name you want to identify this cluster with in Grafana dashboards. The metric_relabel_configs rule rewrites the cluster_name label on all scraped metrics, so dashboard panels like Cluster Name display the value you configure here.

Identify clusters in Grafana dashboards

The pre-built dashboards in the aerospike-monitoring repository use the cluster_name label to filter panels. Because cluster_name is always aerospike for all Aerospike Cloud clusters, these dashboards display a generic name and cannot differentiate between multiple clusters.

The metric_relabel_configs rule in the scrape configuration rewrites the cluster_name label on all scraped metrics before Prometheus stores them. This means the pre-built Grafana dashboards display the name you configure without any dashboard modification.

If you monitor multiple Aerospike Cloud clusters, add a separate scrape job for each cluster with a different CLUSTER_NAME value. The existing Cluster dropdown in the pre-built dashboards then lets you switch between clusters.

Metric labels

Each metric scraped from an Aerospike Cloud cluster includes labels that identify the source. Two labels are important for identifying clusters:

  • cluster_name: Always aerospike for all Aerospike Cloud clusters, regardless of the name you entered during provisioning. The server configuration sets this value and you cannot change it.
  • database_id: The unique identifier for your Aerospike Cloud database, shown as Cluster ID on the Details tab of the Aerospike Cloud Console. The exporter includes this label automatically in every metric. You do not need to configure anything to use it. This is the same UUID that appears in your database hostname.
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?