From 56d20b0683ad0c619c1ae9683e574ad9e608e238 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Mon, 3 Aug 2020 18:47:11 +0100 Subject: [PATCH] Try default settings fro adapter --- charts/kubezero-metrics/values.yaml | 40 +++++++++++++++-------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/charts/kubezero-metrics/values.yaml b/charts/kubezero-metrics/values.yaml index ff8150de..55818369 100644 --- a/charts/kubezero-metrics/values.yaml +++ b/charts/kubezero-metrics/values.yaml @@ -17,6 +17,12 @@ prometheus-operator: enabled: true kubeApiServer: enabled: true + kubeStateMetrics: + enabled: true + kubelet: + enabled: true + + # Disabled until we figure out how to scrape etcd with ssl client certs, scheduler/proxy/controller require https since 1.17 kubeControllerManager: enabled: false kubeDns: @@ -27,10 +33,6 @@ prometheus-operator: enabled: false kubeScheduler: enabled: false - kubeStateMetrics: - enabled: true - kubelet: - enabled: true prometheusOperator: enabled: true @@ -118,20 +120,8 @@ prometheus-adapter: # https://github.com/coreos/kube-prometheus/blob/master/manifests/prometheus-adapter-configMap.yaml resource: cpu: - containerQuery: sum(irate(container_cpu_usage_seconds_total{<<.LabelMatchers>>,container!="POD",container!="",pod!=""}[5m])) by (<<.GroupBy>>) - nodeQuery: sum(1 - irate(node_cpu_seconds_total{mode="idle"}[5m]) * on(namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}) by (<<.GroupBy>>) - resources: - overrides: - node: - resource: node - namespace: - resource: namespace - pod: - resource: pod - containerLabel: container - memory: - containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,container!="POD",container!="",pod!=""}) by (<<.GroupBy>>) - nodeQuery: sum(node_memory_MemTotal_bytes{job="node-exporter",<<.LabelMatchers>>} - node_memory_MemAvailable_bytes{job="node-exporter",<<.LabelMatchers>>}) by (<<.GroupBy>>) + containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[3m])) by (<<.GroupBy>>) + nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[3m])) by (<<.GroupBy>>) resources: overrides: instance: @@ -141,4 +131,16 @@ prometheus-adapter: pod: resource: pod containerLabel: container - window: 5m + memory: + containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>) + nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>) + resources: + overrides: + instance: + resource: node + namespace: + resource: namespace + pod: + resource: pod + containerLabel: container + window: 3m