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
| Metric | Warning | Critical | Meaning |
|---|---|---|---|
aerospike_namespace_data_avail_pct | Below 50% | Below 20% | Storage is filling up |
aerospike_namespace_stop_writes | - | Equals 1 | Namespace has stopped accepting writes |
aerospike_namespace_hwm_breached | - | Equals 1 | High 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.
-
In the sidebar, navigate to Alerts & IRM > Alerting > Alert rules.
-
Click + New alert rule. This creates a fresh alert with no pre-populated queries.
-
Enter a name:
Data usage warning -
In the Define query and alert condition box:
-
Select your Prometheus data source (for example,
grafanacloud-yourname-prom). -
Enter the query:
100 - aerospike_namespace_data_avail_pctThis calculates the percentage of storage used.
-
-
In the Expressions box:
- The default Threshold expression has Input set to A (your query).
- Set the condition: IS ABOVE
50. - Click Preview to verify. You should see a value (for example,
0if no data is stored).
This triggers when data usage exceeds 50%, alerting you before storage becomes constrained.
-
In the Add folder and labels box:
- Click + New folder and create a folder named
Aerospike.
- Click + New folder and create a folder named
-
In the Set evaluation behavior box:
- Click + New evaluation group.
- Enter name:
cluster-health - Set Evaluation interval to
1m. - Click Create.
- Set Pending period to
1m.
-
In the Configure notifications box:
- Click View or create contact points.
- Click + Create contact point.
- Enter a name:
Aerospike alerts - Select integration type: Email (or your preferred method).
- Enter your email address.
- Click Save contact point.
- Return to the alert rule tab.
- In the Contact point dropdown, select Aerospike alerts.
-
Click Save.
Create a stop writes alert
-
Navigate to Alerts & IRM > Alerting > Alert rules.
-
Click + New alert rule.
-
Enter a name:
Stop writes -
In the Define query and alert condition box:
-
Select your Prometheus data source.
-
Enter the query:
aerospike_namespace_stop_writes
-
-
In the Expressions box:
- The default Threshold has Input set to A.
- Set the condition: IS ABOVE
0.
-
In the Add folder and labels box, select the Aerospike folder.
-
In the Set evaluation behavior box:
- Select the cluster-health evaluation group.
- Set Pending period to None (fire immediately).
-
In the Configure notifications box, select Aerospike alerts.
-
Click Save.
Verify alert rules
-
In the sidebar, navigate to Alerts & IRM > Alerting > Alert rules.
-
Expand Grafana-managed > Aerospike > cluster-health to see your rules.
-
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.