Integration types
Aiven supports two types of CloudWatch integrations:- CloudWatch Metrics - Send service performance metrics to CloudWatch
- CloudWatch Logs - Stream service logs to CloudWatch log groups
CloudWatch metrics integration
Prerequisites
- An AWS account and the region it is in
- An Aiven account with a service running
- AWS Access Key and Secret Key
To generate your AWS credentials:
- Open your AWS console under the IAM dashboard
- Click Users and open the Security credentials tab
- Choose Create access key
- Click Download and keep the file secure
Configure the metrics endpoint
Create CloudWatch endpoint
Click AWS CloudWatch Metrics and select Add a new endpoint or Create new.
Configure endpoint settings
Enter the following details:
- Endpoint name - Reference name for this integration
- CloudWatch Namespace - Organize your metrics in different spaces
- Access Key - Your AWS access key
- Secret Key - Your AWS secret key
- Region - Your AWS account region
Enable metrics on a service
CloudWatch logs integration
Prerequisites
- An AWS account with the region configured
- An Aiven account with a running service
- AWS Access Key and Secret Key with appropriate permissions
Configure using Aiven Console
Create logs endpoint
In the Aiven Console, select Integration endpoints and choose AWS CloudWatch Logs.
Add new endpoint
Select Add new endpoint or Create new and configure:
- Endpoint name - Reference name for this integration
- Access Key - Your AWS access key
- Secret Key - Your AWS secret key
- Region - Your AWS account region
- Log Group Name - (Optional) Where log streams are grouped. If not provided, it will be generated.
Configure using Aiven CLI
Parameters
| Variable | Description |
|---|---|
PROJECT | Aiven project where your endpoint is saved |
ENDPOINT_NAME | Reference name for this log integration |
LOG_GROUP_NAME | (Optional) Group for log streams on CloudWatch |
AWS_REGION | AWS region of your account |
AWS_ACCESS_KEY | Your AWS access key ID |
AWS_SECRET_ACCESS_KEY | Your AWS secret access key |
AIVEN_SERVICE_NAME | Aiven service name to send logs from |
ENDPOINT_ID | ID of the integration endpoint |
Troubleshooting
Metrics not appearing
- Verify your AWS credentials have the correct permissions
- Check that the CloudWatch namespace is correctly configured
- Allow a few minutes for initial data to appear
- Ensure the service integration is enabled
Logs not streaming
- Confirm AWS credentials have all required CloudWatch Logs permissions
- Verify the AWS region matches your CloudWatch configuration
- Check log group name doesn’t conflict with existing groups
- Review AWS CloudWatch Logs service limits