From 05f3fb85600e574a86fb05c32e422c7c042a6a0b Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Thu, 26 Jan 2023 16:21:36 +0200 Subject: [PATCH 01/15] Update kubernetes provder documentation to clearly state the correct usage of kubernetes labels in autodiscover conditions --- .../kubernetes-conditions-autodiscover.asciidoc | 12 +++++++++++- .../providers/kubernetes-provider.asciidoc | 3 +++ .../release-notes/release-notes-8.6.asciidoc | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index f5cde77f3a..3ebc34a99e 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -67,7 +67,9 @@ You should now be able to see Redis data flowing in on index `metrics-redis.info NOTE: All assets (dashboards, ingest pipelines, and so on) related to the Redis integration are not installed. You need to explicitly <>. -To set the target host dynamically for a targeted Pod based on its labels, use a variable in the {agent} policy to return path information from the provider: +Conditions can also be used in `Kubernetes` input in order to set the target host dynamically for a targeted Pod based on its labels. +This is useful for datasets that target specific pods like `kube-scheduler` or `kube-controller-manager`. +The following configuration will enable `kubernetes.scheduler` dataset only for pods which have the label `component=kube-scheduler` defined. [source,yaml] ---- @@ -86,6 +88,14 @@ To set the target host dynamically for a targeted Pod based on its labels, use a WARNING: In some "As a Service" Kubernetes implementations, like GKE, the control plane nodes or even the Pods running on them won’t be visible. In these cases, it won’t be possible to use scheduler metricsets, necessary for this example. Refer https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_scheduler_and_controllermanager[scheduler and controller manager] to find more information. +NOTE: Pods labels and annotations can be used in autodiscover conditions. In the case of labels or annotations that include dots(`.`), they can be used in conditions exactly as +they are defined in the pods. For example `condition: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx'`. This should not be mistaken with optional dedoted labels and annotations +stored into Elasticsearch(<>). + +WARNING: Before 8.6 release, labels used in autodiscover conditions were dedoted in case `labels.dedot` parameter was set to `true` in Kubernetes Provider +configuration. The same did not apply for annotations. This was fixed in 8.6 release. Refer to <>. + + Following the Redis example, if you deploy another Redis Pod with a different port, it should be detected. To check this, go, for example, to the field `service.address` under `metrics-redis.info-default`. It should be displaying two different services. To obtain the policy generated by this configuration, connect to {agent} container: diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc index b4c67b2895..9487cf58dd 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc @@ -189,6 +189,9 @@ The available keys are: These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event. +`kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be mistaken with +optional dedoted labels and annotations added in the event. For examples refer to <>. + Note that not all of these fields are available by default and special configuration options are needed in order to include them. diff --git a/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc b/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc index 8d34469e97..51e4f43a83 100644 --- a/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc +++ b/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc @@ -66,6 +66,21 @@ provided. For more information, refer to {agent-pull}1140[#1140]. Remove the `--pprof` argument from any scripts or commands you use. ==== +[discrete] +[[breaking-1398]] +.Not dedoted Kubernetes pod labes to be used for autodiscover conditions +[%collapsible] +==== +*Details* + +Kubernetes pod labels used in autodiscover conditions are not dedoted anymore. This means that +`.` are not replaced with `_` in labels like `app.kubernetes.io/component=controller`. +This follows the same approach as kubernetes annotations. For more information refer to <>. + +*Impact* + +Any template used for standalone elastic agent or installed integration that makes use +of dedoted kubernetes labels inside conditions has to be updated. +==== + [discrete] [[known-issues-8.6.0]] === Known issues From de2602f32aa98e0afaf2d3051e7d03393a9a7c20 Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Thu, 26 Jan 2023 16:31:17 +0200 Subject: [PATCH 02/15] Reorder warnings and notes --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 3ebc34a99e..3208d98d0e 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -86,8 +86,6 @@ The following configuration will enable `kubernetes.scheduler` dataset only for condition: ${kubernetes.labels.component} == 'kube-scheduler' ---- -WARNING: In some "As a Service" Kubernetes implementations, like GKE, the control plane nodes or even the Pods running on them won’t be visible. In these cases, it won’t be possible to use scheduler metricsets, necessary for this example. Refer https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_scheduler_and_controllermanager[scheduler and controller manager] to find more information. - NOTE: Pods labels and annotations can be used in autodiscover conditions. In the case of labels or annotations that include dots(`.`), they can be used in conditions exactly as they are defined in the pods. For example `condition: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx'`. This should not be mistaken with optional dedoted labels and annotations stored into Elasticsearch(<>). @@ -95,6 +93,7 @@ stored into Elasticsearch(<>). WARNING: Before 8.6 release, labels used in autodiscover conditions were dedoted in case `labels.dedot` parameter was set to `true` in Kubernetes Provider configuration. The same did not apply for annotations. This was fixed in 8.6 release. Refer to <>. +WARNING: In some "As a Service" Kubernetes implementations, like GKE, the control plane nodes or even the Pods running on them won’t be visible. In these cases, it won’t be possible to use scheduler metricsets, necessary for this example. Refer https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_scheduler_and_controllermanager[scheduler and controller manager] to find more information. Following the Redis example, if you deploy another Redis Pod with a different port, it should be detected. To check this, go, for example, to the field `service.address` under `metrics-redis.info-default`. It should be displaying two different services. From 0c11433705bda77299ed1e3b1638247f3c3d2234 Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Thu, 26 Jan 2023 16:45:20 +0200 Subject: [PATCH 03/15] Fix typo --- .../ingest-management/release-notes/release-notes-8.6.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc b/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc index 51e4f43a83..ff39630809 100644 --- a/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc +++ b/docs/en/ingest-management/release-notes/release-notes-8.6.asciidoc @@ -68,7 +68,7 @@ Remove the `--pprof` argument from any scripts or commands you use. [discrete] [[breaking-1398]] -.Not dedoted Kubernetes pod labes to be used for autodiscover conditions +.Not dedoted Kubernetes pod labels to be used for autodiscover conditions [%collapsible] ==== *Details* + From 37053b7d8182c2533631c151cf8040cd2d53d537 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:12:50 +0200 Subject: [PATCH 04/15] Update docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc Co-authored-by: Chris Mark --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 3208d98d0e..2b8181846e 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -67,7 +67,7 @@ You should now be able to see Redis data flowing in on index `metrics-redis.info NOTE: All assets (dashboards, ingest pipelines, and so on) related to the Redis integration are not installed. You need to explicitly <>. -Conditions can also be used in `Kubernetes` input in order to set the target host dynamically for a targeted Pod based on its labels. +Conditions can also be used in the `Kubernetes` package in order to set the target host dynamically for a targeted Pod based on its labels. This is useful for datasets that target specific pods like `kube-scheduler` or `kube-controller-manager`. The following configuration will enable `kubernetes.scheduler` dataset only for pods which have the label `component=kube-scheduler` defined. From f599a5027825eae1a73b3ecca6b39d01ba8a0115 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:13:11 +0200 Subject: [PATCH 05/15] Update docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc Co-authored-by: Chris Mark --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 2b8181846e..74add96bea 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -86,7 +86,7 @@ The following configuration will enable `kubernetes.scheduler` dataset only for condition: ${kubernetes.labels.component} == 'kube-scheduler' ---- -NOTE: Pods labels and annotations can be used in autodiscover conditions. In the case of labels or annotations that include dots(`.`), they can be used in conditions exactly as +NOTE: Pods' labels and annotations can be used in autodiscover conditions. In the case of labels or annotations that include dots(`.`), they can be used in conditions exactly as they are defined in the pods. For example `condition: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx'`. This should not be mistaken with optional dedoted labels and annotations stored into Elasticsearch(<>). From 49604a3f83c01fd4b8dd52178ae465e7fe66bbbf Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:13:42 +0200 Subject: [PATCH 06/15] Update docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc Co-authored-by: Chris Mark --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 74add96bea..7a82bc53c6 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -91,7 +91,7 @@ they are defined in the pods. For example `condition: ${kubernetes.labels.app.ku stored into Elasticsearch(<>). WARNING: Before 8.6 release, labels used in autodiscover conditions were dedoted in case `labels.dedot` parameter was set to `true` in Kubernetes Provider -configuration. The same did not apply for annotations. This was fixed in 8.6 release. Refer to <>. +configuration (by default `true`). The same did not apply for annotations. This was fixed in 8.6 release. Refer to <>. WARNING: In some "As a Service" Kubernetes implementations, like GKE, the control plane nodes or even the Pods running on them won’t be visible. In these cases, it won’t be possible to use scheduler metricsets, necessary for this example. Refer https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_scheduler_and_controllermanager[scheduler and controller manager] to find more information. From 37c7132c78a481148881abd18d421195c11b964c Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:14:44 +0200 Subject: [PATCH 07/15] Update docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc Co-authored-by: Chris Mark --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 7a82bc53c6..a8c56ceb22 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -87,7 +87,7 @@ The following configuration will enable `kubernetes.scheduler` dataset only for ---- NOTE: Pods' labels and annotations can be used in autodiscover conditions. In the case of labels or annotations that include dots(`.`), they can be used in conditions exactly as -they are defined in the pods. For example `condition: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx'`. This should not be mistaken with optional dedoted labels and annotations +they are defined in the pods. For example `condition: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx'`. This should not be confused with the dedoted (by default) labels and annotations stored into Elasticsearch(<>). WARNING: Before 8.6 release, labels used in autodiscover conditions were dedoted in case `labels.dedot` parameter was set to `true` in Kubernetes Provider From 56e395a806b80a5e71200ca0c6f8b57e0fd3a431 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:14:57 +0200 Subject: [PATCH 08/15] Update docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc Co-authored-by: Chris Mark --- .../configuration/providers/kubernetes-provider.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc index 9487cf58dd..cc0b661e12 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc @@ -189,7 +189,7 @@ The available keys are: These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event. -`kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be mistaken with +`kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be confused with optional dedoted labels and annotations added in the event. For examples refer to <>. Note that not all of these fields are available by default and special configuration options From d11720c05ddaed65001248350029d9d86b40bda2 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 10:15:16 +0200 Subject: [PATCH 09/15] Update docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc Co-authored-by: Chris Mark --- .../configuration/providers/kubernetes-provider.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc index cc0b661e12..a165a2a75d 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc @@ -190,7 +190,7 @@ The available keys are: These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event. `kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be confused with -optional dedoted labels and annotations added in the event. For examples refer to <>. +labels and annotations added in the final Elasticsearch document and which are dedoted by default. For examples refer to <>. Note that not all of these fields are available by default and special configuration options are needed in order to include them. From 23a43822c666455bcd10fd70344abfd2ae6a0e46 Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Fri, 27 Jan 2023 11:15:18 +0200 Subject: [PATCH 10/15] Add more conditions examples --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index a8c56ceb22..4215ecb99a 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -37,6 +37,10 @@ To automatically identify a Redis Pod and monitor it with the Redis integration, The condition `${kubernetes.labels.app} == 'redis'` will make the {agent} look for a Pod with the label `app:redis` within the scope defined in its manifest. For a list of provider fields that you can use in conditions, refer to <>. +Some examples of conditions usage are: +1. For a pod with label `app.kubernetes.io/name=ingress-nginx` the condition should be `condition: ${kubernetes.labels.app.kubernetes.io/name} == "ingress-nginx"` +2. For a pod with annotation `prometheus.io/scrape: "true"` the condition should be `${kubernetes.annotations.prometheus.io/scrape} == "true"` +3. For a pod with name `kube-scheduler-kind-control-plane` the condition should be `${kubernetes.pod.name == "kube-scheduler-kind-control-plane"` The `redis` input defined in the {agent} manifest only specifies the`info` metricset. To learn about other available metricsets and their configuration settings, refer to the {metricbeat-ref}/metricbeat-module-redis.html[Redis module page]. From e7771ca322ef8a0a7b1c8cf1cc2493aa62c951d4 Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Fri, 27 Jan 2023 12:15:48 +0200 Subject: [PATCH 11/15] Highlight labels and annotations comment --- .../configuration/providers/kubernetes-provider.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc index a165a2a75d..cb1f4dd385 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/providers/kubernetes-provider.asciidoc @@ -189,7 +189,8 @@ The available keys are: These are the fields available within config templating. The `kubernetes.*` fields will be available on each emitted event. -`kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be confused with + +NOTE: `kubernetes.labels.*` and `kubernetes.annotations.*` used in config templating are not dedoted and should not be confused with labels and annotations added in the final Elasticsearch document and which are dedoted by default. For examples refer to <>. Note that not all of these fields are available by default and special configuration options From 329d1e9c1309910aa545aec8f7bd72e529a51ba5 Mon Sep 17 00:00:00 2001 From: MichaelKatsoulis Date: Fri, 27 Jan 2023 15:22:20 +0200 Subject: [PATCH 12/15] Fix list --- .../kubernetes-conditions-autodiscover.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 4215ecb99a..2ee9b3037b 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -38,9 +38,9 @@ The condition `${kubernetes.labels.app} == 'redis'` will make the {agent} look f For a list of provider fields that you can use in conditions, refer to <>. Some examples of conditions usage are: -1. For a pod with label `app.kubernetes.io/name=ingress-nginx` the condition should be `condition: ${kubernetes.labels.app.kubernetes.io/name} == "ingress-nginx"` -2. For a pod with annotation `prometheus.io/scrape: "true"` the condition should be `${kubernetes.annotations.prometheus.io/scrape} == "true"` -3. For a pod with name `kube-scheduler-kind-control-plane` the condition should be `${kubernetes.pod.name == "kube-scheduler-kind-control-plane"` +1. For a pod with label `app.kubernetes.io/name=ingress-nginx` the condition should be `condition: ${kubernetes.labels.app.kubernetes.io/name} == "ingress-nginx"`. +2. For a pod with annotation `prometheus.io/scrape: "true"` the condition should be `${kubernetes.annotations.prometheus.io/scrape} == "true"`. +3. For a pod with name `kube-scheduler-kind-control-plane` the condition should be `${kubernetes.pod.name == "kube-scheduler-kind-control-plane"`. The `redis` input defined in the {agent} manifest only specifies the`info` metricset. To learn about other available metricsets and their configuration settings, refer to the {metricbeat-ref}/metricbeat-module-redis.html[Redis module page]. From e40babb64aedd5908e21d3354abd8e9aede4ea78 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 15:25:07 +0200 Subject: [PATCH 13/15] Update kubernetes-conditions-autodiscover.asciidoc --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 2ee9b3037b..6b6931bb40 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -37,7 +37,9 @@ To automatically identify a Redis Pod and monitor it with the Redis integration, The condition `${kubernetes.labels.app} == 'redis'` will make the {agent} look for a Pod with the label `app:redis` within the scope defined in its manifest. For a list of provider fields that you can use in conditions, refer to <>. + Some examples of conditions usage are: + 1. For a pod with label `app.kubernetes.io/name=ingress-nginx` the condition should be `condition: ${kubernetes.labels.app.kubernetes.io/name} == "ingress-nginx"`. 2. For a pod with annotation `prometheus.io/scrape: "true"` the condition should be `${kubernetes.annotations.prometheus.io/scrape} == "true"`. 3. For a pod with name `kube-scheduler-kind-control-plane` the condition should be `${kubernetes.pod.name == "kube-scheduler-kind-control-plane"`. @@ -301,4 +303,4 @@ To set the log path of Pods dynamically in the configuration, use a variable in prospector.scanner.symlinks: true type: filestream ---- -==== \ No newline at end of file +==== From 48ccaf1649d2d636d0ab7af7f5489e1451229dd6 Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Fri, 27 Jan 2023 15:25:48 +0200 Subject: [PATCH 14/15] Update kubernetes-conditions-autodiscover.asciidoc --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 6b6931bb40..255fdd0ada 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -37,7 +37,6 @@ To automatically identify a Redis Pod and monitor it with the Redis integration, The condition `${kubernetes.labels.app} == 'redis'` will make the {agent} look for a Pod with the label `app:redis` within the scope defined in its manifest. For a list of provider fields that you can use in conditions, refer to <>. - Some examples of conditions usage are: 1. For a pod with label `app.kubernetes.io/name=ingress-nginx` the condition should be `condition: ${kubernetes.labels.app.kubernetes.io/name} == "ingress-nginx"`. From f73c366823828a55a60a7802e33fef978f47beab Mon Sep 17 00:00:00 2001 From: Michael Katsoulis Date: Mon, 30 Jan 2023 10:41:20 +0200 Subject: [PATCH 15/15] Update kubernetes-conditions-autodiscover.asciidoc --- .../autodiscovery/kubernetes-conditions-autodiscover.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc index 255fdd0ada..0ae88aad85 100644 --- a/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc +++ b/docs/en/ingest-management/elastic-agent/configuration/autodiscovery/kubernetes-conditions-autodiscover.asciidoc @@ -72,7 +72,7 @@ You should now be able to see Redis data flowing in on index `metrics-redis.info NOTE: All assets (dashboards, ingest pipelines, and so on) related to the Redis integration are not installed. You need to explicitly <>. -Conditions can also be used in the `Kubernetes` package in order to set the target host dynamically for a targeted Pod based on its labels. +Conditions can also be used in inputs configuration in order to set the target host dynamically for a targeted Pod based on its labels. This is useful for datasets that target specific pods like `kube-scheduler` or `kube-controller-manager`. The following configuration will enable `kubernetes.scheduler` dataset only for pods which have the label `component=kube-scheduler` defined.