From e228b7337c5469745129eb7d8bf99864eb56b586 Mon Sep 17 00:00:00 2001 From: Ashok Srirama Date: Wed, 13 Nov 2024 17:25:41 -0500 Subject: [PATCH] Added new scraper jobs for KSH and KCM Metrics --- .../resources/otel-collector-config.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/common/resources/otel-collector-config.yml b/lib/common/resources/otel-collector-config.yml index 53f80a97..33ce3953 100644 --- a/lib/common/resources/otel-collector-config.yml +++ b/lib/common/resources/otel-collector-config.yml @@ -123,6 +123,42 @@ spec: regex: apiserver_request_duration_seconds_bucket;(0.15|0.2|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2|3|3.5|4|4.5|6|7|8|9|15|25|40|50) replacement: $1 action: drop + - job_name: 'ksh-metrics' + scheme: https + metrics_path: /apis/metrics.eks.amazonaws.com/v1/ksh/container/metrics + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - source_labels: + [ + __meta_kubernetes_namespace, + __meta_kubernetes_service_name, + __meta_kubernetes_endpoint_port_name, + ] + action: keep + regex: default;kubernetes;https + - job_name: 'kcm-metrics' + scheme: https + metrics_path: /apis/metrics.eks.amazonaws.com/v1/kcm/container/metrics + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - source_labels: + [ + __meta_kubernetes_namespace, + __meta_kubernetes_service_name, + __meta_kubernetes_endpoint_port_name, + ] + action: keep + regex: default;kubernetes;https {{ stop enableAPIserverJob }} - job_name: serviceMonitor/default/kube-prometheus-stack-prometheus-node-exporter/0 honor_timestamps: true