From 089b770a9a081783311d9c2fd1b08a2d3e60f731 Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 28 Jan 2025 21:04:14 -0500 Subject: [PATCH] fix: pod logs label keep (#1177) * Moved labelsToKeep to end of loki.process * Updated Meta-Monitoring Example * Updated Test --- .../_common_log_processing.alloy.tpl | 15 ++++--- .../feature-pod-logs/tests/default_test.yaml | 44 +++++++++---------- .../examples/extra-rules/alloy-logs.alloy | 10 ++--- .../docs/examples/extra-rules/output.yaml | 10 ++--- .../integrations/grafana/alloy-logs.alloy | 10 ++--- .../features/integrations/grafana/output.yaml | 10 ++--- .../integrations/loki/alloy-logs.alloy | 10 ++--- .../features/integrations/loki/output.yaml | 10 ++--- .../integrations/mimir/alloy-logs.alloy | 10 ++--- .../features/integrations/mimir/output.yaml | 10 ++--- .../integrations/mysql/alloy-logs.alloy | 10 ++--- .../features/integrations/mysql/output.yaml | 10 ++--- .../docs/examples/meta-monitoring/README.md | 12 +++++ .../meta-monitoring/alloy-singleton.alloy | 10 ++--- .../docs/examples/meta-monitoring/output.yaml | 12 ++--- .../docs/examples/meta-monitoring/values.yaml | 12 +++++ .../integration-grafana/.rendered/output.yaml | 10 ++--- .../integration-loki/.rendered/output.yaml | 10 ++--- .../integration-mysql/.rendered/output.yaml | 10 ++--- 19 files changed, 130 insertions(+), 105 deletions(-) diff --git a/charts/k8s-monitoring/charts/feature-pod-logs/templates/_common_log_processing.alloy.tpl b/charts/k8s-monitoring/charts/feature-pod-logs/templates/_common_log_processing.alloy.tpl index f4ba24a738..8382f94375 100644 --- a/charts/k8s-monitoring/charts/feature-pod-logs/templates/_common_log_processing.alloy.tpl +++ b/charts/k8s-monitoring/charts/feature-pod-logs/templates/_common_log_processing.alloy.tpl @@ -50,13 +50,6 @@ loki.process "pod_logs" { } } {{- end }} -{{- with .Values.labelsToKeep }} - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = {{ append . "integration" | toJson }} - } -{{- end }} {{- if or .Values.staticLabels .Values.staticLabelsFrom }} @@ -75,6 +68,14 @@ loki.process "pod_logs" { {{ tpl .Values.extraLogProcessingStages $ | indent 2 }} {{- end }} +{{- with .Values.labelsToKeep }} + + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = {{ append . "integration" | toJson }} + } +{{- end }} + forward_to = argument.logs_destinations.value } diff --git a/charts/k8s-monitoring/charts/feature-pod-logs/tests/default_test.yaml b/charts/k8s-monitoring/charts/feature-pod-logs/tests/default_test.yaml index 2b692dd7df..d29fe64fbd 100644 --- a/charts/k8s-monitoring/charts/feature-pod-logs/tests/default_test.yaml +++ b/charts/k8s-monitoring/charts/feature-pod-logs/tests/default_test.yaml @@ -473,7 +473,7 @@ tests: argument "logs_destinations" { comment = "Must be a list of log destinations where collected logs should be forwarded to" } - + discovery.relabel "filtered_pods" { targets = discovery.kubernetes.pods.targets rule { @@ -498,7 +498,7 @@ tests: replacement = "$1" target_label = "job" } - + // set the container runtime as a label rule { action = "replace" @@ -507,21 +507,21 @@ tests: replacement = "$1" target_label = "tmp_container_runtime" } - + // set the job label from the k8s.grafana.com/logs.job annotation if it exists rule { source_labels = ["__meta_kubernetes_pod_annotation_k8s_grafana_com_logs_job"] regex = "(.+)" target_label = "job" } - + // make all labels on the pod available to the pipeline as labels, // they are omitted before write to loki via stage.label_keep unless explicitly set rule { action = "labelmap" regex = "__meta_kubernetes_pod_label_(.+)" } - + // make all annotations on the pod available to the pipeline as labels, // they are omitted before write to loki via stage.label_keep unless explicitly set rule { @@ -529,7 +529,7 @@ tests: regex = "__meta_kubernetes_pod_annotation_(.+)" } } - + discovery.kubernetes "pods" { role = "pod" selectors { @@ -537,10 +537,10 @@ tests: field = "spec.nodeName=" + sys.env("HOSTNAME") } } - + discovery.relabel "filtered_pods_with_paths" { targets = discovery.relabel.filtered_pods.output - + rule { source_labels = ["__meta_kubernetes_pod_uid", "__meta_kubernetes_pod_container_name"] separator = "/" @@ -549,22 +549,22 @@ tests: target_label = "__path__" } } - + local.file_match "pod_logs" { path_targets = discovery.relabel.filtered_pods_with_paths.output } - + loki.source.file "pod_logs" { targets = local.file_match.pod_logs.targets forward_to = [loki.process.pod_logs.receiver] } - + loki.process "pod_logs" { stage.match { selector = "{tmp_container_runtime=~\"containerd|cri-o\"}" // the cri processing stage extracts the following k/v pairs: log, stream, time, flags stage.cri {} - + // Set the extract flags and stream values as labels stage.labels { values = { @@ -573,12 +573,12 @@ tests: } } } - + stage.match { selector = "{tmp_container_runtime=\"docker\"}" // the docker processing stage extracts the following k/v pairs: log, stream, time stage.docker {} - + // Set the extract stream value as a label stage.labels { values = { @@ -586,7 +586,7 @@ tests: } } } - + // Drop the filename label, since it's not really useful in the context of Kubernetes, where we already have cluster, // namespace, pod, and container labels. Drop any structured metadata. Also drop the temporary // container runtime label as it is no longer needed. @@ -596,19 +596,19 @@ tests: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } - + stage.static_labels { values = { region = "central", color = sys.env("COLOR"), } } - + + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/extra-rules/alloy-logs.alloy b/charts/k8s-monitoring/docs/examples/extra-rules/alloy-logs.alloy index 3b5ca6d323..fcab949cc6 100644 --- a/charts/k8s-monitoring/docs/examples/extra-rules/alloy-logs.alloy +++ b/charts/k8s-monitoring/docs/examples/extra-rules/alloy-logs.alloy @@ -152,11 +152,6 @@ declare "pod_logs" { ] } - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } - stage.static_labels { values = { site = "lab2", @@ -178,6 +173,11 @@ declare "pod_logs" { } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/extra-rules/output.yaml b/charts/k8s-monitoring/docs/examples/extra-rules/output.yaml index 8c04ae2fbb..39081a2575 100644 --- a/charts/k8s-monitoring/docs/examples/extra-rules/output.yaml +++ b/charts/k8s-monitoring/docs/examples/extra-rules/output.yaml @@ -807,11 +807,6 @@ data: ] } - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } - stage.static_labels { values = { site = "lab2", @@ -833,6 +828,11 @@ data: } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/grafana/alloy-logs.alloy b/charts/k8s-monitoring/docs/examples/features/integrations/grafana/alloy-logs.alloy index 0cb3e1be52..cd673593bd 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/grafana/alloy-logs.alloy +++ b/charts/k8s-monitoring/docs/examples/features/integrations/grafana/alloy-logs.alloy @@ -158,11 +158,6 @@ declare "pod_logs" { "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{job=\"integrations/grafana\",instance=\"grafana\",namespace=~\"o11y\"}" @@ -195,6 +190,11 @@ declare "pod_logs" { } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/grafana/output.yaml b/charts/k8s-monitoring/docs/examples/features/integrations/grafana/output.yaml index 38cb88b11b..258fe7b601 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/grafana/output.yaml +++ b/charts/k8s-monitoring/docs/examples/features/integrations/grafana/output.yaml @@ -534,11 +534,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{job=\"integrations/grafana\",instance=\"grafana\",namespace=~\"o11y\"}" @@ -571,6 +566,11 @@ data: } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/loki/alloy-logs.alloy b/charts/k8s-monitoring/docs/examples/features/integrations/loki/alloy-logs.alloy index a053f002e5..25b46ac915 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/loki/alloy-logs.alloy +++ b/charts/k8s-monitoring/docs/examples/features/integrations/loki/alloy-logs.alloy @@ -167,11 +167,6 @@ declare "pod_logs" { "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{integration=\"loki\",instance=\"loki\"}" @@ -203,6 +198,11 @@ declare "pod_logs" { } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/loki/output.yaml b/charts/k8s-monitoring/docs/examples/features/integrations/loki/output.yaml index 88201f7601..c02635c621 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/loki/output.yaml +++ b/charts/k8s-monitoring/docs/examples/features/integrations/loki/output.yaml @@ -578,11 +578,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{integration=\"loki\",instance=\"loki\"}" @@ -614,6 +609,11 @@ data: } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/mimir/alloy-logs.alloy b/charts/k8s-monitoring/docs/examples/features/integrations/mimir/alloy-logs.alloy index 7a8842a615..128f4933aa 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/mimir/alloy-logs.alloy +++ b/charts/k8s-monitoring/docs/examples/features/integrations/mimir/alloy-logs.alloy @@ -167,11 +167,6 @@ declare "pod_logs" { "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Mimir stage.match { selector = "{integration=\"mimir\",instance=\"mimir\"}" @@ -203,6 +198,11 @@ declare "pod_logs" { } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/mimir/output.yaml b/charts/k8s-monitoring/docs/examples/features/integrations/mimir/output.yaml index f4f1df7fac..cd0bf167cf 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/mimir/output.yaml +++ b/charts/k8s-monitoring/docs/examples/features/integrations/mimir/output.yaml @@ -578,11 +578,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Mimir stage.match { selector = "{integration=\"mimir\",instance=\"mimir\"}" @@ -614,6 +609,11 @@ data: } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/mysql/alloy-logs.alloy b/charts/k8s-monitoring/docs/examples/features/integrations/mysql/alloy-logs.alloy index a1e8504277..a5f9b3bb0a 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/mysql/alloy-logs.alloy +++ b/charts/k8s-monitoring/docs/examples/features/integrations/mysql/alloy-logs.alloy @@ -172,11 +172,6 @@ declare "pod_logs" { "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: MySQL stage.match { selector = "{integration=\"mysql\"}" @@ -209,6 +204,11 @@ declare "pod_logs" { } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/features/integrations/mysql/output.yaml b/charts/k8s-monitoring/docs/examples/features/integrations/mysql/output.yaml index 1837a35c85..60b615fcda 100644 --- a/charts/k8s-monitoring/docs/examples/features/integrations/mysql/output.yaml +++ b/charts/k8s-monitoring/docs/examples/features/integrations/mysql/output.yaml @@ -401,11 +401,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: MySQL stage.match { selector = "{integration=\"mysql\"}" @@ -438,6 +433,11 @@ data: } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/meta-monitoring/README.md b/charts/k8s-monitoring/docs/examples/meta-monitoring/README.md index 5d879d2cf6..677fd0b7f5 100644 --- a/charts/k8s-monitoring/docs/examples/meta-monitoring/README.md +++ b/charts/k8s-monitoring/docs/examples/meta-monitoring/README.md @@ -117,7 +117,9 @@ clusterMetrics: kube-state-metrics: enabled: true namespaces: + - collectors - logs + - metrics - o11y extraMetricProcessingRules: |- rule { @@ -147,6 +149,16 @@ nodeLogs: podLogs: enabled: true + labelsToKeep: + - app + - app_kubernetes_io_name + - component + - container + - job + - level + - namespace + - pod + - service_name gatherMethod: kubernetesApi collector: alloy-singleton namespaces: diff --git a/charts/k8s-monitoring/docs/examples/meta-monitoring/alloy-singleton.alloy b/charts/k8s-monitoring/docs/examples/meta-monitoring/alloy-singleton.alloy index fa395d2206..517e053256 100644 --- a/charts/k8s-monitoring/docs/examples/meta-monitoring/alloy-singleton.alloy +++ b/charts/k8s-monitoring/docs/examples/meta-monitoring/alloy-singleton.alloy @@ -552,11 +552,6 @@ declare "pod_logs" { "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{job=\"integrations/grafana\",instance=\"grafana\",namespace=~\"o11y\"}" @@ -702,6 +697,11 @@ declare "pod_logs" { } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app","app_kubernetes_io_name","component","container","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/docs/examples/meta-monitoring/output.yaml b/charts/k8s-monitoring/docs/examples/meta-monitoring/output.yaml index 7b3569c735..a02859bf41 100644 --- a/charts/k8s-monitoring/docs/examples/meta-monitoring/output.yaml +++ b/charts/k8s-monitoring/docs/examples/meta-monitoring/output.yaml @@ -627,11 +627,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{job=\"integrations/grafana\",instance=\"grafana\",namespace=~\"o11y\"}" @@ -777,6 +772,11 @@ data: } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app","app_kubernetes_io_name","component","container","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } @@ -4547,7 +4547,7 @@ spec: - --port=8080 - --resources=certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments - --metric-labels-allowlist=nodes=[agentpool,alpha.eksctl.io/cluster-name,alpha.eksctl.io/nodegroup-name,beta.kubernetes.io/instance-type,cloud.google.com/gke-nodepool,cluster_name,ec2_amazonaws_com_Name,ec2_amazonaws_com_aws_autoscaling_groupName,ec2_amazonaws_com_aws_autoscaling_group_name,ec2_amazonaws_com_name,eks_amazonaws_com_nodegroup,k8s_io_cloud_provider_aws,karpenter.sh/nodepool,kubernetes.azure.com/cluster,kubernetes.io/arch,kubernetes.io/hostname,kubernetes.io/os,node.kubernetes.io/instance-type,topology.kubernetes.io/region,topology.kubernetes.io/zone] - - --namespaces=logs,o11y + - --namespaces=collectors,logs,metrics,o11y imagePullPolicy: IfNotPresent image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.14.0 ports: diff --git a/charts/k8s-monitoring/docs/examples/meta-monitoring/values.yaml b/charts/k8s-monitoring/docs/examples/meta-monitoring/values.yaml index c6beedc2c5..e4653ffbb8 100644 --- a/charts/k8s-monitoring/docs/examples/meta-monitoring/values.yaml +++ b/charts/k8s-monitoring/docs/examples/meta-monitoring/values.yaml @@ -108,7 +108,9 @@ clusterMetrics: kube-state-metrics: enabled: true namespaces: + - collectors - logs + - metrics - o11y extraMetricProcessingRules: |- rule { @@ -138,6 +140,16 @@ nodeLogs: podLogs: enabled: true + labelsToKeep: + - app + - app_kubernetes_io_name + - component + - container + - job + - level + - namespace + - pod + - service_name gatherMethod: kubernetesApi collector: alloy-singleton namespaces: diff --git a/charts/k8s-monitoring/tests/integration/integration-grafana/.rendered/output.yaml b/charts/k8s-monitoring/tests/integration/integration-grafana/.rendered/output.yaml index 2253f856f7..817a7c9b74 100644 --- a/charts/k8s-monitoring/tests/integration/integration-grafana/.rendered/output.yaml +++ b/charts/k8s-monitoring/tests/integration/integration-grafana/.rendered/output.yaml @@ -1067,11 +1067,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{job=\"integrations/grafana\",instance=\"grafana\"}" @@ -1104,6 +1099,11 @@ data: } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/tests/integration/integration-loki/.rendered/output.yaml b/charts/k8s-monitoring/tests/integration/integration-loki/.rendered/output.yaml index d74a62ade1..7f5f5fca4b 100644 --- a/charts/k8s-monitoring/tests/integration/integration-loki/.rendered/output.yaml +++ b/charts/k8s-monitoring/tests/integration/integration-loki/.rendered/output.yaml @@ -1111,11 +1111,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: Loki stage.match { selector = "{integration=\"loki\",instance=\"loki\"}" @@ -1147,6 +1142,11 @@ data: } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } } diff --git a/charts/k8s-monitoring/tests/integration/integration-mysql/.rendered/output.yaml b/charts/k8s-monitoring/tests/integration/integration-mysql/.rendered/output.yaml index ebef6378e8..9ab16241ce 100644 --- a/charts/k8s-monitoring/tests/integration/integration-mysql/.rendered/output.yaml +++ b/charts/k8s-monitoring/tests/integration/integration-mysql/.rendered/output.yaml @@ -374,11 +374,6 @@ data: "tmp_container_runtime", ] } - - // Only keep the labels that are defined in the `keepLabels` list. - stage.label_keep { - values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] - } // Integration: MySQL stage.match { selector = "{integration=\"mysql\"}" @@ -411,6 +406,11 @@ data: } } + // Only keep the labels that are defined in the `keepLabels` list. + stage.label_keep { + values = ["app_kubernetes_io_name","container","instance","job","level","namespace","pod","service_name","integration"] + } + forward_to = argument.logs_destinations.value } }