Commit bafe3a6d authored by Kamil Trzciński's avatar Kamil Trzciński

Fix common_metrics.yml

parent 1d0f0cc0
...@@ -207,6 +207,7 @@ ...@@ -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 ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment