Fix common_metrics.yml
This commit is contained in:
parent
1d0f0cc0ce
commit
bafe3a6d6a
2 changed files with 2 additions and 1 deletions
|
@ -207,6 +207,7 @@
|
||||||
required_metrics:
|
required_metrics:
|
||||||
- container_cpu_usage_seconds_total
|
- container_cpu_usage_seconds_total
|
||||||
weight: 1
|
weight: 1
|
||||||
|
queries:
|
||||||
- id: system_metrics_kubernetes_container_core_usage_canary
|
- id: system_metrics_kubernetes_container_core_usage_canary
|
||||||
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))'
|
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))'
|
||||||
label: Pod average
|
label: Pod average
|
||||||
|
|
|
@ -43,7 +43,7 @@ describe Importers::CommonMetricsImporter do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "imports all IDs" do
|
it "imports all IDs" do
|
||||||
expect(PrometheusMetric.common.pluck(:identifier)).to eq(query_ids)
|
expect(PrometheusMetric.common.pluck(:identifier)).to contain_exactly(*query_ids)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue