From ad840b827aef89c859366af8d14b3c98fd780c04 Mon Sep 17 00:00:00 2001 From: Riccardo Freschi Date: Thu, 14 Mar 2024 08:29:38 +0100 Subject: [PATCH] addressing pr comments --- .gitignore | 1 + ...eks-inferentia-opensource-observability.md | 6 +- .../neuron/neuron-monitor.dockerfile | 33 - .../neuron/pytorch-inference-resnet50.yml | 96 - .../resources/otel-collector-config-new.yml | 1622 ----------------- 5 files changed, 3 insertions(+), 1755 deletions(-) delete mode 100644 lib/common/resources/neuron/neuron-monitor.dockerfile delete mode 100644 lib/common/resources/neuron/pytorch-inference-resnet50.yml delete mode 100644 lib/common/resources/otel-collector-config-new.yml diff --git a/.gitignore b/.gitignore index 1248f4c9..7df7bedd 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ node_modules # CDK asset staging directory .cdk.staging cdk.out +cdk.json dist *.swp cdk.context.json diff --git a/docs/patterns/single-new-eks-observability-accelerators/single-new-eks-inferentia-opensource-observability.md b/docs/patterns/single-new-eks-observability-accelerators/single-new-eks-inferentia-opensource-observability.md index 5bc68efc..1105b518 100644 --- a/docs/patterns/single-new-eks-observability-accelerators/single-new-eks-inferentia-opensource-observability.md +++ b/docs/patterns/single-new-eks-observability-accelerators/single-new-eks-inferentia-opensource-observability.md @@ -151,9 +151,7 @@ aws ec2 describe-instance-type-offerings \ --region us-east-2 ``` -8. For the `neuron-monitor` DaemonSet, you can either use the image already referenced into the manifest, or build your own using the Dockerfile at location `cdk-aws-observability-accelerator/lib/common/resources/neuron/neuron-monitor.dockerfile`, [push it to an ECR repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html) of your choice and update the image URL in the manifest at location `cdk-aws-observability-accelerator/lib/single-new-eks-opensource-observability-pattern/neuron/neuron-monitor.yaml`. - -9. Once all pre-requisites are set you are ready to deploy the pipeline. Run the following command from the root of this repository to deploy the pipeline stack: +8. Once all pre-requisites are set you are ready to deploy the pipeline. Run the following command from the root of this repository to deploy the pipeline stack: ```bash make build @@ -234,7 +232,7 @@ Login to your Amazon Managed Grafana workspace and navigate to the Dashboards pa To actually see some interesting metrics on the Grafana dashboard, we will apply the following manifest: ```bash -kubectl apply -f ./lib/common/resources/neuron/pytorch-inference-resnet50.yml +curl https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/main/artifacts/k8s-deployment-manifest-templates/neuron/pytorch-inference-resnet50.yml | kubectl apply -f - ``` This is just a sample workload that compiles the [torchvision ResNet50 model](https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-inferentia-pytorch-neuron.html) and runs repetitive inference in a loop to generate telemetry data. diff --git a/lib/common/resources/neuron/neuron-monitor.dockerfile b/lib/common/resources/neuron/neuron-monitor.dockerfile deleted file mode 100644 index 784e63d6..00000000 --- a/lib/common/resources/neuron/neuron-monitor.dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM public.ecr.aws/lts/ubuntu:20.04_stable -ARG DEBIAN_FRONTEND=noninteractive - -ARG APT_REPO=https://apt.repos.neuron.amazonaws.com - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - wget \ - gnupg2 \ - pciutils \ - python3 \ - python3-pip \ - python3-setuptools \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /tmp/tmp* \ - && apt-get clean - -RUN echo "deb $APT_REPO focal main" > /etc/apt/sources.list.d/neuron.list \ - && wget -qO - $APT_REPO/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add - \ - && apt-get update -y \ - && apt-get install -y aws-neuronx-tools \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /tmp/tmp* \ - && apt-get clean \ - && pip3 install prometheus-client - -ENV PATH="${PATH}:/opt/aws/neuron/bin" - -RUN useradd neuron-user -USER neuron-user - -CMD ["/bin/bash"] \ No newline at end of file diff --git a/lib/common/resources/neuron/pytorch-inference-resnet50.yml b/lib/common/resources/neuron/pytorch-inference-resnet50.yml deleted file mode 100644 index d5870d98..00000000 --- a/lib/common/resources/neuron/pytorch-inference-resnet50.yml +++ /dev/null @@ -1,96 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: pytorch-resnet50-script -data: - pytorch-resnet50.sh: | - #!/usr/bin/env python - import torch - import numpy as np - import os - import torch_neuron - from torchvision import models, transforms, datasets - import time - from urllib import request - import json - - image = torch.zeros([1, 3, 224, 224], dtype=torch.float32) - - ## Load a pretrained ResNet50 model - model = models.resnet50(pretrained=True) - - ## Tell the model we are using it for evaluation (not training) - model.eval() - model_neuron = torch.neuron.trace(model, example_inputs=[image]) - - ## Create an image directory containing a small kitten - os.makedirs("./torch_neuron_test/images", exist_ok=True) - request.urlretrieve("https://raw.githubusercontent.com/awslabs/mxnet-model-server/master/docs/images/kitten_small.jpg", - "./torch_neuron_test/images/kitten_small.jpg") - - ## Fetch labels to output the top classifications - request.urlretrieve("https://s3.amazonaws.com/deep-learning-models/image-models/imagenet_class_index.json","imagenet_class_index.json") - idx2label = [] - - with open("imagenet_class_index.json", "r") as read_file: - class_idx = json.load(read_file) - idx2label = [class_idx[str(k)][1] for k in range(len(class_idx))] - - ## Import a sample image and normalize it into a tensor - normalize = transforms.Normalize( - mean=[0.485, 0.456, 0.406], - std=[0.229, 0.224, 0.225]) - - eval_dataset = datasets.ImageFolder( - os.path.dirname("./torch_neuron_test/"), - transforms.Compose([ - transforms.Resize([224, 224]), - transforms.ToTensor(), - normalize, - ]) - ) - - image, _ = eval_dataset[0] - image = torch.tensor(image.numpy()[np.newaxis, ...]) - - ## Predict - while True: - results = model_neuron( image ) - time.sleep(0.1) ---- -apiVersion: v1 -kind: Pod -metadata: - name: pytorch-inference-resnet50 -spec: - tolerations: - - key: node-role.kubernetes.io/control-plane - operator: Exists - effect: NoSchedule - - key: node-role.kubernetes.io/master - operator: Exists - effect: NoSchedule - containers: - - name: pytorch - image: 763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-inference-neuron:1.13.1-neuron-py310-sdk2.13.2-ubuntu20.04 - command: ["/script/pytorch-resnet50.sh"] - volumeMounts: - - name: script - mountPath: "/script" - resources: - limits: - cpu: 4 - memory: 4Gi - aws.amazon.com/neuron: 1 - requests: - cpu: "1" - memory: 1Gi - securityContext: - capabilities: - add: - - IPC_LOCK - volumes: - - name: script - configMap: - name: pytorch-resnet50-script - defaultMode: 0777 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]