Reputation: 844
I have a custom metric which is a state metric of fractional value. It is ranged from 0 to 1, e.g. memory utilization, 1 means it is fully utilized. How can we write its HPA yaml file?
I see there is an example showing how to write the yaml file for an integer value over a period of time. How can we modify this for a fractional value?
rules:
custom:
- seriesQuery: 'http_requests_total{namespace!="",pod!=""}'
resources:
overrides:
namespace: {resource: "namespace"}
pod: {resource: "pod"}
name:
matches: "^(.*)_total"
as: "${1}_per_second"
metricsQuery: 'sum(rate(<<.Series>>{<<.LabelMatchers>>}[2m])) by (<<.GroupBy>>)'
Upvotes: 0
Views: 53