---
title: "Aerospike integration | Grafana Cloud documentation"
description: "Learn about Aerospike Grafana Cloud integration."
---

# Aerospike integration for Grafana Cloud

Aerospike is a high-performance, NoSQL, key-value database designed for ultra-low-latency and high-throughput applications. It offers fast data storage and retrieval, scalability, and ACID compliance, making it suitable for real-time, mission-critical data processing.

This integration supports Aerospike versions 6.2.0+

This integration includes 8 useful alerts and 4 pre-built dashboards to help monitor and visualize Aerospike metrics and logs.

## Before you begin

#### Aerospike

This integration is designed to target clustered Aerospike environments. For best results, namespaces within a single cluster should have unique names.

By default, Aerospike logs to STDERR. To enable log collection for your Aerospike instance, create the `/var/log/aerospike` directory and modify the logging section of the instance’s `aerospike.conf` file to send logs to a file. Save these changes and restart Aerospike to begin logging to a file.

- `context any` instructs Aerospike to capture log messages from all contexts. For a full list of logging contexts, see [this documentation](https://docs.aerospike.com/server/operations/configure/logging/aerospike-logs#logging-contexts).
- `info` instructs Aerospike to capture log messages of severity level info or higher. Other possible values are `critical`, `warning`, `debug`, and `detail`.

This example is the recommended configuration for an Aerospike instance, but if your log file path or name differs, modify your configuration accordingly.

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
logging {
        file /var/log/aerospike/aerospike.log {
                context any info
        }
}
```

Certain metrics used in this integration may not appear depending on your Aerospike instance’s configuration (`aerospike.conf`):

- to monitor disk metrics, one or more namespaces must be configured to use `storage-engine device`
- to monitor cache metrics, one or more namespace must be configured to use `storage-engine device` with `data-in-memory false`

Example namespace configuration:

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
namespace test {
        replication-factor 2
        memory-size 1G

        storage-engine device {
                file /opt/aerospike/data/test.data
                filesize 1G
                data-in-memory false
                read-page-cache true
        }
}
```

#### Aerospike prometheus exporter

This integration supports metrics and logs from an Aerospike instance. It is configured to work with the [Aerospike Prometheus Exporter](https://github.com/aerospike/aerospike-prometheus-exporter), which must be installed and configured separately from Grafana Alloy.

To export logs from your Aerospike instance, modify the logging configuration section of `ape.toml`:

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
log_file = "/var/log/aerospike/aerospike.log"
log_level = "info"
```

## Install Aerospike integration for Grafana Cloud

1. In your Grafana Cloud stack, click **Connections** in the left-hand menu.
2. Find **Aerospike** and click its tile to open the integration.
3. Review the prerequisites in the **Configuration Details** tab and set up Grafana Alloy to send Aerospike metrics and logs to your Grafana Cloud instance.
4. Click **Install** to add this integration’s pre-built dashboards and alerts to your Grafana Cloud instance, and you can start monitoring your Aerospike setup.

## Configuration snippets for Grafana Alloy

### Advanced mode

The following snippets provide examples to guide you through the configuration process.

To instruct Grafana Alloy to scrape your Aerospike instances, **manually** copy and append the snippets to your alloy configuration file, then follow subsequent instructions.

### Advanced metrics snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
prometheus.scrape "metrics_integrations_integrations_aerospike" {
	targets = [{
		__address__       = "<node-hostname>:9145",
		aerospike_cluster = "<as-cluster-name>",
	}]
	forward_to = [prometheus.remote_write.metrics_service.receiver]
	job_name   = "integrations/aerospike"
}
```

To monitor your Aerospike instance, you must use a [discovery.relabel](/docs/alloy/latest/reference/components/discovery.relabel/) component to discover your Aerospike Prometheus endpoint and apply appropriate labels, followed by a [prometheus.scrape](/docs/grafana-cloud/send-data/alloy/reference/components/prometheus/prometheus.scrape/) component to scrape it.

Configure the following properties within each `discovery.relabel` component:

- `__address__`: The address to your Aerospike Prometheus metrics endpoint.
- `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this Aerospike instance. Make sure this label value is the same for all telemetry data collected for this instance.
- `aerospike_cluster`: The `aerospike_cluster` label to group your Aerospike instances within a cluster. Set the same value for all nodes within your cluster.

If you have multiple Aerospike servers to scrape, configure one `discovery.relabel` for each and scrape them by including each under `targets` within the `prometheus.scrape` component.

### Advanced logs snippets

#### linux

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
local.file_match "logs_integrations_integrations_aerospike" {
	path_targets = [{
		__address__       = "localhost",
		__path__          = "/var/log/aerospike/aerospike.log",
		aerospike_cluster = "<as-cluster-name>",
		instance          = "<node-hostname>:9145",
		job               = "integrations/aerospike",
	}]
}

loki.process "logs_integrations_integrations_aerospike" {
	forward_to = [loki.write.grafana_cloud_loki.receiver]

	stage.multiline {
		firstline     = "\\w{3} \\d{2} \\d{4}"
		max_lines     = 0
		max_wait_time = "3s"
	}

	stage.regex {
		expression = "\\w{3} \\d{2} \\d{4} \\d{2}:\\d{2}:\\d{2} \\w{3}: (?P<level>\\w+) \\((?P<context>\\w+)\\): (?P<trace>\\(\\S+\\))\\s+(?P<message>(?s:.*))$"
	}

	stage.labels {
		values = {
			context = null,
			level   = null,
		}
	}
}

loki.source.file "logs_integrations_integrations_aerospike" {
	targets    = local.file_match.logs_integrations_integrations_aerospike.targets
	forward_to = [loki.process.logs_integrations_integrations_aerospike.receiver]
}
```

To monitor your Aerospike instance logs, you will use a combination of the following components:

- [local.file\_match](/docs/alloy/latest/reference/components/local.file_match) defines where to find the log file to be scraped. Change the following properties according to your environment:
  
  - `__address__`: The Aerospike instance address
  - `__path__`: The path to the log file.
  - `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this Aerospike instance. Make sure this label value is the same for all telemetry data collected for this instance.
  - `aerospike_cluster`: The `aerospike_cluster` label to group your Aerospike instances within a cluster. Set the same value for all nodes within your cluster.
- [loki.process](/docs/alloy/latest/reference/components/loki.process) defines how to process logs before sending it to Loki.
- [loki.source.file](/docs/alloy/latest/reference/components/loki.source.file) sends logs to Loki.

## Kubernetes instructions

Instructions for Kubernetes

### Before you begin with Kubernetes

**Please note**: These instructions assume the use of the [Kubernetes Monitoring Helm chart](https://github.com/grafana/k8s-monitoring-helm)

This integration is designed to target clustered Aerospike environments. For best results, namespaces within a single cluster should have unique names.

Certain metrics used in this integration may not appear depending on your Aerospike instance’s configuration (`aerospike.conf`):

- to monitor disk metrics, one or more namespaces must be configured to use `storage-engine device`
- to monitor cache metrics, one or more namespace must be configured to use `storage-engine device` with `data-in-memory false`

Example namespace configuration:

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
namespace test {
        replication-factor 2
        memory-size 1G

        storage-engine device {
                file /opt/aerospike/data/test.data
                filesize 1G
                data-in-memory false
                read-page-cache true
        }
}
```

### Configuration snippets for Kubernetes Helm chart

The following snippets provide examples to guide you through the configuration process.

To scrape your Aerospike instances, **manually** modify your Kubernetes Monitoring Helm chart with these configuration snippets.

Replace any values between the angle brackets `<>` in the provided snippets with your desired configuration values.

#### Metrics snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
alloy-metrics:
    extraConfig: |-
        discovery.kubernetes "aerospike" {
            role = "pod"
            selectors {
                role = "pod"
                label = "<aerospike_pod_label>=<aerospike_pod_label_value>"
            }
        }
        
        discovery.relabel "aerospike" {
            targets = discovery.kubernetes.aerospike.targets
            rule {
                source_labels = ["__meta_kubernetes_pod_container_port_number"]
                regex = "<aerospike_pod_port_number>"
                action = "keep"
            }
            rule {
                source_labels = ["__meta_kubernetes_namespace", "__meta_kubernetes_pod_container_name"]
                separator = "-"
                target_label = "instance"
            }
            rule {
                replacement = "<your-aerospike-cluster-name>"
                target_label = "aerospike_cluster"
            }
            rule {
                replacement = "integrations/aerospike"
                target_label = "job"
            }
        }
        
        prometheus.scrape "metrics_aerospike" {
            targets      = discovery.relabel.aerospike.output
            honor_labels = true
            forward_to   = [prometheus.remote_write.grafana_cloud_metrics.receiver]
        }
```

#### Logs snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
podLogs:
    extraDiscoveryRules: |-
        rule {
            source_labels = ["__meta_kubernetes_pod_label_<aerospike_pod_label>"]
            regex = "<aerospike_pod_label_value>"
            replacement = "aerospike"
            target_label = "integration"
        }

    extraLogProcessingStages: |-
        stage.match {
            selector = "{integration=\\"aerospike\\"}"

            stage.multiline {
                firstline     = "\\\\w{3} \\\\d{2} \\\\d{4}"
                max_lines     = 0
                max_wait_time = "3s"
            }
        
            stage.regex {
                expression = "\\\\w{3} \\\\d{2} \\\\d{4} \\\\d{2}:\\\\d{2}:\\\\d{2} \\\\w{3}: (?P<level>\\\\w+) \\\\((?P<context>\\\\w+)\\\\): (?P<trace>\\\\(\\\\S+\\\\))\\\\s+(?P<message>(?s:.*))$"
            }
            
            stage.template {
                source   = "instance"
                template = "{{ .namespace }}-{{ .container }}"
            }

            stage.static_labels {
                values = {
                    aerospike_cluster = "<your-aerospike-cluster-name>",
                    job               = "integrations/aerospike",
                }
            }
        
            stage.labels {
                values = {
                    context = null,
                    instance = null,
                    level   = null,
                }
            }
        }
```

## Dashboards

The Aerospike integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.

- Aerospike instance overview
- Aerospike logs
- Aerospike namespace overview
- Aerospike overview

**Aerospike overview (cluster overview)**

**Aerospike overview (client requests)**

**Aerospike logs (logs)**

## Alerts

The Aerospike integration includes the following useful alerts:

Expand table

| Alert                             | Description                                                                                                                                      |
|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| AerospikeNodeHighMemoryUsage      | Critical: There is a limited amount of memory available for a node.                                                                              |
| AerospikeNamespaceHighDiskUsage   | Critical: There is a limited amount of disk space available for a node.                                                                          |
| AerospikeUnavailablePartitions    | Critical: There are unavailable partitions in the Aerospike cluster.                                                                             |
| AerospikeDeadPartitions           | Critical: There are dead partitions in the Aerospike cluster.                                                                                    |
| AerospikeNamespaceRejectingWrites | Critical: A namespace is currently rejecting all writes. Check for unavailable/dead partitions, clock skew, or nodes running out of memory/disk. |
| AerospikeHighClientReadErrorRate  | Warning: There is a high rate of errors for client read transactions.                                                                            |
| AerospikeHighClientWriteErrorRate | Warning: There is a high rate of errors for client write transactions.                                                                           |
| AerospikeHighClientUDFErrorRate   | Warning: There is a high rate of errors for client UDF transactions.                                                                             |

## Metrics

The most important metrics provided by the Aerospike integration, which are used on the pre-built dashboards and Prometheus alerts, are as follows:

- aerospike\_namespace\_cache\_read\_pct
- aerospike\_namespace\_client\_read\_error
- aerospike\_namespace\_client\_read\_filtered\_out
- aerospike\_namespace\_client\_read\_not\_found
- aerospike\_namespace\_client\_read\_success
- aerospike\_namespace\_client\_read\_timeout
- aerospike\_namespace\_client\_udf\_complete
- aerospike\_namespace\_client\_udf\_error
- aerospike\_namespace\_client\_udf\_filtered\_out
- aerospike\_namespace\_client\_udf\_timeout
- aerospike\_namespace\_client\_write\_error
- aerospike\_namespace\_client\_write\_filtered\_out
- aerospike\_namespace\_client\_write\_success
- aerospike\_namespace\_client\_write\_timeout
- aerospike\_namespace\_clock\_skew\_stop\_writes
- aerospike\_namespace\_dead\_partitions
- aerospike\_namespace\_device\_free\_pct
- aerospike\_namespace\_memory\_free\_pct
- aerospike\_namespace\_ns\_cluster\_size
- aerospike\_namespace\_stop\_writes
- aerospike\_namespace\_unavailable\_partitions
- aerospike\_namespace\_xmem\_id
- aerospike\_node\_stats\_client\_connections
- aerospike\_node\_stats\_fabric\_connections
- aerospike\_node\_stats\_heap\_efficiency\_pct
- aerospike\_node\_stats\_heartbeat\_connections
- aerospike\_node\_stats\_system\_free\_mem\_pct
- aerospike\_node\_up
- up

## Changelog

md ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```md
# 1.0.0 - December 2025

* Chore: Fix incorrect semver to 1.0.0. No further changes

# 0.0.2 - November 2024

- Update status panel check queries

# 0.0.1 - September 2023

- Initial release
```

## Cost

By connecting your Aerospike instance to Grafana Cloud, you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see [Active series and dpm usage](/docs/grafana-cloud/fundamentals/active-series-and-dpm/) and [Cloud tier pricing](/products/cloud/pricing/).
