'How to set the GCP Autoscaler to use "Time series per instance"
I want to set my Autoscaler to use "Time series per instance" rather than "Single time series per group", and I want to set it either via the gcloud tool or, ideally, via terraform.
I don't see either of these to be a setting that I can configure, and my autoscaler is set to "Single time series per group" by default with the following terraform config (I'm using version 3.62.0):
resource "google_compute_region_autoscaler" "engine_autoscaler" {
name = "myautoscaler"
project = "myproject"
region = "europe-west1"
target = google_compute_region_instance_group_manager.mymig.self_link
autoscaling_policy {
max_replicas = 10
min_replicas = 1
cooldown_period = 30
metric {
name = "custom.googleapis.com/mymetric"
type = "GAUGE"
target = 1
}
}
}
I also tried setting the Autoscaler according to the example in Google's documentation about per-instance metrics:
gcloud compute instance-groups managed set-autoscaling example-managed-instance-group \
--custom-metric-utilization metric=example.googleapis.com/path/to/metric,utilization-target-type=GAUGE,utilization-target=10 \
--max-num-replicas 20 \
--cool-down-period 90 \
--region us-west1
However, this also created an Autoscaler with "Single time series per group" settings, despite what is suggested in the documentation.
How can I change this setting? I can't do this through the browser because I need this to be automated via terraform/gcloud.
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
