From d443be583b9b7f34169520bafdae983cfa0bff3e Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Sat, 7 Oct 2023 14:46:10 -0400 Subject: [PATCH 1/2] Fixing Breaking Changes --- .../resources/otel-collector-config-new.yml | 1622 +++++++++++++++++ .../index.ts | 3 +- .../amp-monitoring.ts | 3 +- .../gpu-index.ts | 3 +- .../graviton-index.ts | 3 +- .../index.ts | 3 +- package.json | 24 +- 7 files changed, 1644 insertions(+), 17 deletions(-) create mode 100644 lib/common/resources/otel-collector-config-new.yml diff --git a/lib/common/resources/otel-collector-config-new.yml b/lib/common/resources/otel-collector-config-new.yml new file mode 100644 index 00000000..456fae3e --- /dev/null +++ b/lib/common/resources/otel-collector-config-new.yml @@ -0,0 +1,1622 @@ +# +# OpenTelemetry Collector configuration +# Metrics pipeline with Prometheus Receiver and AWS Remote Write Exporter sending metrics to Amazon Managed Prometheus +# +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: otel-collector-amp + namespace: "{{namespace}}" +spec: + mode: "{{deploymentMode}}" + image: public.ecr.aws/aws-observability/aws-otel-collector:v0.21.0 + serviceAccount: adot-collector + config: | + receivers: + prometheus: + config: + global: + scrape_interval: 15s + scrape_timeout: 10s + external_labels: + cluster: "{{clusterName}}" + scrape_configs: + - job_name: 'kubernetes-kubelet' + scheme: https + 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: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc.cluster.local:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/$${1}/proxy/metrics + - job_name: 'kubelet' + scheme: https + 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: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc.cluster.local:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/$${1}/proxy/metrics/cadvisor + + - job_name: serviceMonitor/default/kube-prometheus-stack-prometheus-node-exporter/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (prometheus-node-exporter);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: serviceMonitor/default/kube-prometheus-stack-prometheus/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-prometheus);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_self_monitor, __meta_kubernetes_service_labelpresent_self_monitor] + separator: ; + regex: (true);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-web + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-web + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: serviceMonitor/default/kube-prometheus-stack-operator/0 + honor_labels: true + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-operator);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: https + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: https + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/2 + honor_labels: true + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics/probes + scheme: https + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: https-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_k8s_app] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: https-metrics + action: replace + - source_labels: [__metrics_path__] + separator: ; + regex: (.*) + target_label: metrics_path + replacement: $$1 + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/1 + honor_labels: true + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics/cadvisor + scheme: https + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: https-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_k8s_app] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: https-metrics + action: replace + - source_labels: [__metrics_path__] + separator: ; + regex: (.*) + target_label: metrics_path + replacement: $$1 + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/0 + honor_labels: true + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: https + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] + separator: ; + regex: (kubelet);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: https-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_k8s_app] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: https-metrics + action: replace + - source_labels: [__metrics_path__] + separator: ; + regex: (.*) + target_label: metrics_path + replacement: $$1 + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kube-state-metrics/0 + honor_labels: true + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_instance, __meta_kubernetes_service_labelpresent_app_kubernetes_io_instance] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] + separator: ; + regex: (kube-state-metrics);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: serviceMonitor/default/kube-prometheus-stack-kube-scheduler/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-kube-scheduler);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kube-proxy/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-kube-proxy);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kube-etcd/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-kube-etcd);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-kube-controller-manager/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-kube-controller-manager);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-coredns/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-coredns);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-metrics + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_jobLabel] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-metrics + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + namespaces: + own_namespace: false + names: + - kube-system + - job_name: serviceMonitor/default/kube-prometheus-stack-apiserver/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: https + authorization: + type: Bearer + credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + server_name: kubernetes + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_component, __meta_kubernetes_service_labelpresent_component] + separator: ; + regex: (kubernetes);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: https + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_component] + separator: ; + regex: (.+) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: https + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: serviceMonitor/default/kube-prometheus-stack-alertmanager/0 + honor_timestamps: true + scrape_interval: 30s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + enable_http2: true + relabel_configs: + - source_labels: [job] + separator: ; + regex: (.*) + target_label: __tmp_prometheus_job_name + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] + separator: ; + regex: (kube-prometheus-stack-alertmanager);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] + separator: ; + regex: (kube-prometheus-stack);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_service_label_self_monitor, __meta_kubernetes_service_labelpresent_self_monitor] + separator: ; + regex: (true);true + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + separator: ; + regex: http-web + replacement: $$1 + action: keep + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Node;(.*) + target_label: node + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] + separator: ; + regex: Pod;(.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: service + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_pod_container_name] + separator: ; + regex: (.*) + target_label: container + replacement: $$1 + action: replace + - source_labels: [__meta_kubernetes_service_name] + separator: ; + regex: (.*) + target_label: job + replacement: $$1 + action: replace + - separator: ; + regex: (.*) + target_label: endpoint + replacement: http-web + action: replace + - source_labels: [__address__] + separator: ; + regex: (.*) + modulus: 1 + target_label: __tmp_hash + replacement: $$1 + action: hashmod + - source_labels: [__tmp_hash] + separator: ; + regex: "0" + replacement: $$1 + action: keep + kubernetes_sd_configs: + - role: endpoints + kubeconfig_file: "" + follow_redirects: true + enable_http2: true + namespaces: + own_namespace: false + names: + - default + - job_name: 'kube-state-metrics' + static_configs: + - targets: ['kube-state-metrics.kube-system.svc.cluster.local:8080'] + - job_name: 'node-exporter' + kubernetes_sd_configs: + - role: endpoints + - job_name: 'kubernetes-java-jmx' + sample_limit: {{javaScrapeSampleLimit}} + metrics_path: {{javaPrometheusMetricsEndpoint}} + kubernetes_sd_configs: + - role: pod + relabel_configs: + - source_labels: [ __address__ ] + action: keep + regex: '.*:9404$' + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - action: replace + source_labels: [ __meta_kubernetes_namespace ] + target_label: Namespace + - source_labels: [ __meta_kubernetes_pod_name ] + action: replace + target_label: pod_name + - action: replace + source_labels: [ __meta_kubernetes_pod_container_name ] + target_label: container_name + - action: replace + source_labels: [ __meta_kubernetes_pod_controller_kind ] + target_label: pod_controller_kind + - action: replace + source_labels: [ __meta_kubernetes_pod_phase ] + target_label: pod_controller_phase + metric_relabel_configs: + - source_labels: [ __name__ ] + regex: 'jvm_gc_collection_seconds.*' + action: drop + exporters: + prometheusremotewrite: + endpoint: "{{remoteWriteEndpoint}}" + auth: + authenticator: sigv4auth + logging: + loglevel: info + extensions: + sigv4auth: + region: "{{awsRegion}}" + service: aps + health_check: + pprof: + endpoint: :1888 + zpages: + endpoint: :55679 + service: + extensions: [pprof, zpages, health_check, sigv4auth] + pipelines: + metrics: + receivers: [prometheus] + exporters: [logging, prometheusremotewrite] diff --git a/lib/existing-eks-opensource-observability-pattern/index.ts b/lib/existing-eks-opensource-observability-pattern/index.ts index 480f082d..88d08741 100644 --- a/lib/existing-eks-opensource-observability-pattern/index.ts +++ b/lib/existing-eks-opensource-observability-pattern/index.ts @@ -118,7 +118,8 @@ export default class ExistingEksOpenSourceobservabilityPattern { .account(account) .region(region) .version('auto') - .enableOpenSourcePatternAddOns(ampAddOnProps) + .enableOpenSourcePatternAddOns() + .withAmpProps(ampAddOnProps) .clusterProvider(importClusterProvider) .resourceProvider(blueprints.GlobalResources.Vpc, new blueprints.VpcProvider(vpcId)) // this is required with import cluster provider .resourceProvider(ampWorkspaceName, new blueprints.CreateAmpProvider(ampWorkspaceName, ampWorkspaceName)) diff --git a/lib/multi-acc-new-eks-mixed-observability-pattern/amp-monitoring.ts b/lib/multi-acc-new-eks-mixed-observability-pattern/amp-monitoring.ts index 981d8e49..6b02f09b 100644 --- a/lib/multi-acc-new-eks-mixed-observability-pattern/amp-monitoring.ts +++ b/lib/multi-acc-new-eks-mixed-observability-pattern/amp-monitoring.ts @@ -63,7 +63,8 @@ export default class AmpMonitoringConstruct { .account(account) .region(region) .version('auto') - .enableOpenSourcePatternAddOns(ampAddOnProps) + .enableOpenSourcePatternAddOns() + .withAmpProps(ampAddOnProps) .resourceProvider(ampWorkspaceName, new blueprints.CreateAmpProvider(ampWorkspaceName, ampWorkspaceName)) .addOns(...addOns) .teams(new team.TeamGeordi, new team.CorePlatformTeam); diff --git a/lib/single-new-eks-opensource-observability-pattern/gpu-index.ts b/lib/single-new-eks-opensource-observability-pattern/gpu-index.ts index 0b2c95e1..63f6e765 100644 --- a/lib/single-new-eks-opensource-observability-pattern/gpu-index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/gpu-index.ts @@ -75,7 +75,8 @@ export default class SingleNewEksGpuOpenSourceObservabilityPattern { .account(account) .region(region) .version('auto') - .enableOpenSourcePatternAddOns(ampAddOnProps) + .enableOpenSourcePatternAddOns() + .withAmpProps(ampAddOnProps) .resourceProvider(ampWorkspaceName, new blueprints.CreateAmpProvider(ampWorkspaceName, ampWorkspaceName)) .clusterProvider( new blueprints.GenericClusterProvider({ diff --git a/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts b/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts index 8bf7d8b1..18f0e0f8 100644 --- a/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts @@ -92,7 +92,8 @@ export default class SingleNewEksGravitonOpenSourceObservabilityPattern { .account(account) .region(region) .version('auto') - .enableOpenSourcePatternAddOns(ampAddOnProps,"v1.27.1-eksbuild.1") + .enableOpenSourcePatternAddOns() + .withAmpProps(ampAddOnProps) .resourceProvider(ampWorkspaceName, new blueprints.CreateAmpProvider(ampWorkspaceName, ampWorkspaceName)) .clusterProvider(new blueprints.MngClusterProvider(mngProps)) .addOns(...addOns) diff --git a/lib/single-new-eks-opensource-observability-pattern/index.ts b/lib/single-new-eks-opensource-observability-pattern/index.ts index c31ae87c..158c5540 100644 --- a/lib/single-new-eks-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/index.ts @@ -100,7 +100,8 @@ export default class SingleNewEksOpenSourceobservabilityPattern { .account(account) .region(region) .version('auto') - .enableOpenSourcePatternAddOns(ampAddOnProps) + .enableOpenSourcePatternAddOns() + .withAmpProps(ampAddOnProps) .resourceProvider(ampWorkspaceName, new blueprints.CreateAmpProvider(ampWorkspaceName, ampWorkspaceName)) .addOns(...addOns) .build(scope, stackId); diff --git a/package.json b/package.json index db6e32ce..7010586d 100644 --- a/package.json +++ b/package.json @@ -10,29 +10,29 @@ "lint": "npx eslint . --ext .js,.jsx,.ts,.tsx" }, "devDependencies": { - "@aws-quickstart/eks-blueprints": "^1.11.3", + "@aws-quickstart/eks-blueprints": "^1.12.0", "@types/jest": "^29.5.1", - "@types/node": "^18.15.12", - "@typescript-eslint/eslint-plugin": "^5.59.0", - "@typescript-eslint/parser": "^5.59.0", + "@types/node": "^18.17.5", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", "copyfiles": "^2.4.1", "eslint": "^8.38.0", - "jest": "^29.5.0", + "jest": "^29.6.2", "ts-jest": "^29.1.0", "ts-node": "^10.9.1", - "typescript": "^5.0.4" + "typescript": "^5.2.2" }, "dependencies": { - "@aws-quickstart/eks-blueprints": "^1.11.3", - "aws-cdk": "2.91.0", + "@aws-quickstart/eks-blueprints": "^1.12.0", + "aws-cdk": "2.99.1", "aws-sdk": "^2.1455.0", - "constructs": "^10.0.0", + "constructs": "^10.2.33", "eks-blueprints-cdk-kubeflow-ext": "0.1.9", "source-map-support": "^0.5.21" }, "overrides": { - "@aws-quickstart/eks-blueprints": "^1.11.3", - "aws-cdk": "2.91.0", + "@aws-quickstart/eks-blueprints": "^1.12.0", + "aws-cdk": "2.99.1", "xml2js": "0.5.0" } -} +} \ No newline at end of file From d1f62065588d3f88da0c01fe8344c95be0ac056d Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Sat, 7 Oct 2023 14:47:45 -0400 Subject: [PATCH 2/2] Fixing Breaking Changes --- .../resources/otel-collector-config-new.yml | 1622 ----------------- 1 file changed, 1622 deletions(-) delete mode 100644 lib/common/resources/otel-collector-config-new.yml diff --git a/lib/common/resources/otel-collector-config-new.yml b/lib/common/resources/otel-collector-config-new.yml deleted file mode 100644 index 456fae3e..00000000 --- a/lib/common/resources/otel-collector-config-new.yml +++ /dev/null @@ -1,1622 +0,0 @@ -# -# OpenTelemetry Collector configuration -# Metrics pipeline with Prometheus Receiver and AWS Remote Write Exporter sending metrics to Amazon Managed Prometheus -# -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: otel-collector-amp - namespace: "{{namespace}}" -spec: - mode: "{{deploymentMode}}" - image: public.ecr.aws/aws-observability/aws-otel-collector:v0.21.0 - serviceAccount: adot-collector - config: | - receivers: - prometheus: - config: - global: - scrape_interval: 15s - scrape_timeout: 10s - external_labels: - cluster: "{{clusterName}}" - scrape_configs: - - job_name: 'kubernetes-kubelet' - scheme: https - 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: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc.cluster.local:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$${1}/proxy/metrics - - job_name: 'kubelet' - scheme: https - 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: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc.cluster.local:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$${1}/proxy/metrics/cadvisor - - - job_name: serviceMonitor/default/kube-prometheus-stack-prometheus-node-exporter/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (prometheus-node-exporter);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: serviceMonitor/default/kube-prometheus-stack-prometheus/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-prometheus);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_self_monitor, __meta_kubernetes_service_labelpresent_self_monitor] - separator: ; - regex: (true);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-web - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-web - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: serviceMonitor/default/kube-prometheus-stack-operator/0 - honor_labels: true - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-operator);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: https - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: https - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/2 - honor_labels: true - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics/probes - scheme: https - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: https-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_k8s_app] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: https-metrics - action: replace - - source_labels: [__metrics_path__] - separator: ; - regex: (.*) - target_label: metrics_path - replacement: $$1 - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/1 - honor_labels: true - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics/cadvisor - scheme: https - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: https-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_k8s_app] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: https-metrics - action: replace - - source_labels: [__metrics_path__] - separator: ; - regex: (.*) - target_label: metrics_path - replacement: $$1 - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kubelet/0 - honor_labels: true - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: https - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecure_skip_verify: true - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_k8s_app, __meta_kubernetes_service_labelpresent_k8s_app] - separator: ; - regex: (kubelet);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: https-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_k8s_app] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: https-metrics - action: replace - - source_labels: [__metrics_path__] - separator: ; - regex: (.*) - target_label: metrics_path - replacement: $$1 - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kube-state-metrics/0 - honor_labels: true - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_instance, __meta_kubernetes_service_labelpresent_app_kubernetes_io_instance] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name, __meta_kubernetes_service_labelpresent_app_kubernetes_io_name] - separator: ; - regex: (kube-state-metrics);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app_kubernetes_io_name] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: serviceMonitor/default/kube-prometheus-stack-kube-scheduler/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-kube-scheduler);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kube-proxy/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-kube-proxy);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kube-etcd/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-kube-etcd);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-kube-controller-manager/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-kube-controller-manager);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-coredns/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-coredns);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-metrics - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_jobLabel] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-metrics - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - namespaces: - own_namespace: false - names: - - kube-system - - job_name: serviceMonitor/default/kube-prometheus-stack-apiserver/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: https - authorization: - type: Bearer - credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - server_name: kubernetes - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_component, __meta_kubernetes_service_labelpresent_component] - separator: ; - regex: (kubernetes);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: https - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_component] - separator: ; - regex: (.+) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: https - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: serviceMonitor/default/kube-prometheus-stack-alertmanager/0 - honor_timestamps: true - scrape_interval: 30s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - relabel_configs: - - source_labels: [job] - separator: ; - regex: (.*) - target_label: __tmp_prometheus_job_name - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_label_app, __meta_kubernetes_service_labelpresent_app] - separator: ; - regex: (kube-prometheus-stack-alertmanager);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_release, __meta_kubernetes_service_labelpresent_release] - separator: ; - regex: (kube-prometheus-stack);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_service_label_self_monitor, __meta_kubernetes_service_labelpresent_self_monitor] - separator: ; - regex: (true);true - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_port_name] - separator: ; - regex: http-web - replacement: $$1 - action: keep - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Node;(.*) - target_label: node - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_endpoint_address_target_kind, __meta_kubernetes_endpoint_address_target_name] - separator: ; - regex: Pod;(.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: service - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_pod_container_name] - separator: ; - regex: (.*) - target_label: container - replacement: $$1 - action: replace - - source_labels: [__meta_kubernetes_service_name] - separator: ; - regex: (.*) - target_label: job - replacement: $$1 - action: replace - - separator: ; - regex: (.*) - target_label: endpoint - replacement: http-web - action: replace - - source_labels: [__address__] - separator: ; - regex: (.*) - modulus: 1 - target_label: __tmp_hash - replacement: $$1 - action: hashmod - - source_labels: [__tmp_hash] - separator: ; - regex: "0" - replacement: $$1 - action: keep - kubernetes_sd_configs: - - role: endpoints - kubeconfig_file: "" - follow_redirects: true - enable_http2: true - namespaces: - own_namespace: false - names: - - default - - job_name: 'kube-state-metrics' - static_configs: - - targets: ['kube-state-metrics.kube-system.svc.cluster.local:8080'] - - job_name: 'node-exporter' - kubernetes_sd_configs: - - role: endpoints - - job_name: 'kubernetes-java-jmx' - sample_limit: {{javaScrapeSampleLimit}} - metrics_path: {{javaPrometheusMetricsEndpoint}} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [ __address__ ] - action: keep - regex: '.*:9404$' - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - action: replace - source_labels: [ __meta_kubernetes_namespace ] - target_label: Namespace - - source_labels: [ __meta_kubernetes_pod_name ] - action: replace - target_label: pod_name - - action: replace - source_labels: [ __meta_kubernetes_pod_container_name ] - target_label: container_name - - action: replace - source_labels: [ __meta_kubernetes_pod_controller_kind ] - target_label: pod_controller_kind - - action: replace - source_labels: [ __meta_kubernetes_pod_phase ] - target_label: pod_controller_phase - metric_relabel_configs: - - source_labels: [ __name__ ] - regex: 'jvm_gc_collection_seconds.*' - action: drop - exporters: - prometheusremotewrite: - endpoint: "{{remoteWriteEndpoint}}" - auth: - authenticator: sigv4auth - logging: - loglevel: info - extensions: - sigv4auth: - region: "{{awsRegion}}" - service: aps - health_check: - pprof: - endpoint: :1888 - zpages: - endpoint: :55679 - service: - extensions: [pprof, zpages, health_check, sigv4auth] - pipelines: - metrics: - receivers: [prometheus] - exporters: [logging, prometheusremotewrite]