Tutorial prerequisites
This tutorial builds on the Aerospike Cloud quickstart. Complete the quickstart first to set up your cluster and VPC peering.
Required
AWS CLI
You need the AWS CLI to run commands in this tutorial.
-
Install the AWS CLI if not already installed.
-
Configure your credentials. If you use AWS SSO, log in with your profile:
Terminal window aws sso login --profile YOUR_PROFILE_NAMEThen set the profile for your session:
Terminal window export AWS_PROFILE=YOUR_PROFILE_NAMEReplace
YOUR_PROFILE_NAMEwith your SSO profile name. -
Verify your credentials are configured:
Terminal window aws sts get-caller-identityYou should see your account ID and user ARN.
Aerospike Cloud quickstart completed
The quickstart sets up your Aerospike Cloud cluster and VPC peering. You need the following information from your quickstart setup:
-
Get your database hostname from the Cloud Console. Navigate to your cluster and copy the hostname (for example,
abc123.aerospike.internal). -
Get your subnet ID. This is the subnet in your VPC that has peering to Aerospike Cloud. Run:
Terminal window aws ec2 describe-subnets --query 'Subnets[*].[SubnetId,VpcId,CidrBlock]' --output tableFind the subnet in your peered VPC and note the
SubnetId. -
Get your security group ID. This security group must allow outbound traffic. Run:
Terminal window aws ec2 describe-security-groups --query 'SecurityGroups[*].[GroupId,GroupName,VpcId]' --output tableFind a security group in your peered VPC and note the
GroupId.
Grafana Cloud account
Grafana Cloud provides managed dashboards and alerting. The free tier is sufficient for this tutorial.
-
Go to grafana.com and click Create free account.
-
Complete the signup process. Grafana Cloud automatically creates an environment for you that includes a Grafana instance, observability services, and endpoints. This is called a stack.
-
In the Grafana Cloud portal, find the Prometheus tile and click it.
-
On the Prometheus onboarding page:
- Select Collect and send metrics to a fully-managed Prometheus Stack.
- Select Custom Setup Options.
- Select Alloy.
-
On the Hosted Prometheus metrics page:
- Select Via Grafana Alloy.
- Ensure Standard is selected (not Kubernetes).
- Click Run Grafana Alloy.
-
In the Alloy configuration modal:
- Select platform: Other Distribution (this tutorial uses ECS).
- Leave architecture as amd64.
- Enter a token name (for example,
alloy-aerospike). - Leave No expiry selected.
- Click Create token.
-
After the token is created, the modal shows install commands. Click Proceed to install integration to continue.
-
On the next page, find Step 3: Set the configuration. This shows the Alloy configuration block with your credentials. Copy these values from the configuration:
Field in config What to save Example urlRemote Write URL https://prometheus-prod-67-prod-us-west-0.grafana.net/api/prom/pushusernameInstance ID 2944621passwordAPI Token glc_eyJvIjoi...Save these values to a text file. You will need them when deploying Alloy.
-
Skip steps 4 and 5 on this page. The CloudFormation template handles the deployment.
Gather your values
Before proceeding, collect these values. You will need them in the next step:
| Value | Description | Example |
|---|---|---|
| Database hostname | From Cloud Console | abc123.aerospike.internal |
| Subnet ID | From your peered VPC | subnet-0abc123def456 |
| Security group ID | From your peered VPC | sg-0abc123def456 |
| Grafana remote write URL | url from Grafana Cloud config | https://prometheus-prod-67-...grafana.net/api/prom/push |
| Grafana instance ID | username from Grafana Cloud config | 2944621 |
| Grafana API token | password from Grafana Cloud config | glc_eyJvIjoi... |