0

I'm trying to set an instance group managed autoscaling based on memory_usage. I installed the agent on my GCP windows server VM and I'm able to see metrics on the Stackdriver dashboard. Now, when I set the metrics type agent.googleapis.com/agent/memory_usage on the instance_group configuration panel, GCP tells me that there is no data to use. I don't understand why.

0

In order to autoscale your VMs based on RAM usage it is required that you create a custom metric that makes use of Stackdriver monitoring.

The custom metric name should begin with "custom.googleapis.com/" followed by a simple name or a path name.

See here for detailed info on creating custom metrics.

As the OP points out, the Stackdriver agent must be installed on the instance(s) in order for certain metrics to be measured, including memory usage. Info on installing the agent can be found here and a list of the additional metrics that require the installation of the agent can be found here.

Once you've created a custom metric, it can then be added to an Instance Group so that it controls the scaling of the instances in that group.There is some useful information here that explains how to do this.

  • 1
    My issue was related to a malfunction of the windows agent. As we can read on this thread they've started to investigate it. In the meanwhile, I've made a nodejs module which does what the agent was supposed to do. If not the right way, but it helps me to achieve the goal. – Giorgio Cerruti Nov 23 '17 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.