Skip to content

Create alert rules

This page guides you through creating Grafana Cloud alert rules that fire when your cluster approaches capacity limits.

Key metrics for scaling alerts

MetricWarningCriticalMeaning
aerospike_namespace_data_avail_pctBelow 50%Below 20%Storage is filling up
aerospike_namespace_stop_writes-Equals 1Namespace has stopped accepting writes
aerospike_namespace_hwm_breached-Equals 1High water mark breached (memory pressure)

The metric memory_free_pct was removed in Database 7.0. For memory-related alerts, monitor stop_writes and hwm_breached which indicate when memory thresholds are exceeded.

See Key metrics to monitor for the complete list of recommended metrics.

Create a storage usage alert

Create an alert rule from scratch (not from a dashboard panel) for a simpler setup.

  1. In the sidebar, navigate to Alerts & IRM > Alerting > Alert rules.

  2. Click + New alert rule. This creates a fresh alert with no pre-populated queries.

  3. Enter a name: Data usage warning

  4. In the Define query and alert condition box:

    1. Select your Prometheus data source (for example, grafanacloud-yourname-prom).

    2. Enter the query:

      100 - aerospike_namespace_data_avail_pct

      This calculates the percentage of storage used.

  5. In the Expressions box:

    1. The default Threshold expression has Input set to A (your query).
    2. Set the condition: IS ABOVE 50.
    3. Click Preview to verify. You should see a value (for example, 0 if no data is stored).

    This triggers when data usage exceeds 50%, alerting you before storage becomes constrained.

  6. In the Add folder and labels box:

    1. Click + New folder and create a folder named Aerospike.
  7. In the Set evaluation behavior box:

    1. Click + New evaluation group.
    2. Enter name: cluster-health
    3. Set Evaluation interval to 1m.
    4. Click Create.
    5. Set Pending period to 1m.
  8. In the Configure notifications box:

    1. Click View or create contact points.
    2. Click + Create contact point.
    3. Enter a name: Aerospike alerts
    4. Select integration type: Email (or your preferred method).
    5. Enter your email address.
    6. Click Save contact point.
    7. Return to the alert rule tab.
    8. In the Contact point dropdown, select Aerospike alerts.
  9. Click Save.

Create a stop writes alert

  1. Navigate to Alerts & IRM > Alerting > Alert rules.

  2. Click + New alert rule.

  3. Enter a name: Stop writes

  4. In the Define query and alert condition box:

    1. Select your Prometheus data source.

    2. Enter the query:

      aerospike_namespace_stop_writes
  5. In the Expressions box:

    1. The default Threshold has Input set to A.
    2. Set the condition: IS ABOVE 0.
  6. In the Add folder and labels box, select the Aerospike folder.

  7. In the Set evaluation behavior box:

    1. Select the cluster-health evaluation group.
    2. Set Pending period to None (fire immediately).
  8. In the Configure notifications box, select Aerospike alerts.

  9. Click Save.

Verify alert rules

  1. In the sidebar, navigate to Alerts & IRM > Alerting > Alert rules.

  2. Expand Grafana-managed > Aerospike > cluster-health to see your rules.

  3. Verify your rules show state Normal (green). This means the condition is not currently met.

It may take a moment for the rules to update their state to Normal after creation.

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?