Get started with Aiven for Metrics
Get started with Aiven for Metrics by creating your service using the Aiven Console or Aiven CLI.
Aiven for Metrics is not currently available on Azure or Google Cloud Marketplace.
Create a service
- Console
- CLI
- Terraform
-
From your project, in the Services page, click Create service.
-
From the Select service page, click Thanos Metrics.
-
Select the cloud provider and region to host your service on.
noteThe pricing for the same service can vary between different providers and regions. The service summary shows you the pricing for your selected options.
-
Select a service plan.
noteThis determines the number of servers and the memory, CPU, and disk resources allocated to your service. See Plans & Pricing.
-
Optional: Add disk storage.
-
Enter a name for your service.
importantYou cannot change the name after you create the service.
-
Optional: Add tags.
-
Click Create service.
The Overview page of the service opens. It shows the connection parameters for your service, its current status, and the configuration options.
The status of the service is Rebuilding during its creation. When the status becomes Running, you can start using the service. This typically takes couple of minutes and can vary between cloud providers and regions.
The Aiven CLI provides a simple and efficient way to create an Aiven for Metrics service. If you prefer creating a new service from the CLI:
-
Determine the service plan, cloud provider, and region to use for your Aiven for Metrics service.
-
Run the following command to create an Aiven for Metrics service named metrics-demo:
avn service create metrics-demo \
--service-type thanos \
--cloud aws-europe-west1 \
--plan startup-4 \
--project PROJECT_NAMEWhere
PROJECT_NAME
is the name of your Aiven project.
To see:
- A full list of default flags, run
avn service create -h
- Type-specific options, run
avn service types -v
The following example files are also available in the Aiven Terraform Provider repository on GitHub.
-
Create a file named
provider.tf
and add the following:Loading...
-
Create a file named
service.tf
and add the following:Loading...
-
Create a file named
variables.tf
and add the following:Loading...
-
Create a file named
terraform.tfvars
and add values for your token and Aiven project.
To apply your Terraform configuration:
-
Initialize Terraform by running:
terraform init
The output is similar to the following:
Initializing the backend...
Initializing provider plugins...
- Finding aiven/aiven versions matching ">= 4.0.0, < 5.0.0"...
- Installing aiven/aiven v4.9.2...
- Installed aiven/aiven v4.9.2
...
Terraform has been successfully initialized!
... -
To create an execution plan and preview the changes, run:
terraform plan
-
To deploy your changes, run:
terraform apply --auto-approve
Create service integrations
Integrate Aiven for Metrics with other Aiven services, such as OpenSearch for advanced queries or Grafana for visualization, or connect it with another Aiven for Metrics service for comprehensive monitoring. Set up integrations using the Aiven Console, Aiven CLI, or Aiven Terraform Provider.
The Aiven for Metrics integration example in GitHub shows you how to use the Aiven Terraform Provider to create and integrate Thanos Metrics with PostgreSQL and Grafana.