Is there a way to define default for a metric by default if not present #584
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/support
Categorizes issue or PR as a support question.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
We use istio_requests_total for scaling . However this metric comes into picture only when we try to hit endpoint of service .
/stats/proemetheus endpoint doesn't give this metric by default .
Since we use this hpa , it comes as UNKNOWN till that service is accessed .
I tried to add vector(0) so that if not present it gives a counter of 0 and this works fine on prometheus but still prometheus adapter complains with 404
Below is the query which we ar esuing
seriesQuery: istio_requests_total{destination_service_name!="",reporter="destination", destination_workload_namespace!=""}
resources:
overrides:
destination_service_name: { resource: "service" }
destination_workload_namespace: { resource: "namespace" }
name:
matches: "^(.*)_total"
as: "${1}_per_second"
metricsQuery: 'sum(rate(<<.Series>>{reporter="destination", <<.LabelMatchers>>}[1m]) or vector(0)) by (<<.GroupBy>>)'
The text was updated successfully, but these errors were encountered: