Compute Engine autoscaling based on memory percent_used (agent.googleapis.com/memory/percent_used) with filter metric.label.state = 'used' is not triggering. How do you fix the metric/filter configuration?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the filter to metric.label.state = 'used' AND metric.label.state = 'buffered' AND metric.label.state = 'cached' AND metric.label.state = 'slab'..
Why this is the answer
The agent.googleapis.com/memory/percentused metric reports memory usage broken down by various states, including 'used', 'buffered', 'cached', and 'slab'. For autoscaling to accurately reflect overall memory pressure, you need to aggregate these components. The original filter metric.label.state = 'used' only considers actively used memory, ignoring other memory that is not truly free. By using AND with multiple metric.label.state values, you combine these categories to represent the total memory consumed, allowing autoscaling to trigger appropriately based on a more comprehensive view of memory utilization. Changing the target type or using bytesused would not address the fundamental issue of incomplete state aggregation. Filtering for 'free' memory would invert the logic and require a different utilization target.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed