diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index 7fe1138031..16804d953f 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -60,15 +60,6 @@ exporters: - container_filesystem_usage - container_filesystem_available - container_filesystem_utilization - - container_status_running - - container_status_terminated - - container_status_waiting - - container_status_waiting_reason_crash_loop_back_off - - container_status_waiting_reason_image_pull_error - - container_status_waiting_reason_start_error - - container_status_waiting_reason_create_container_error - - container_status_waiting_reason_create_container_config_error - - container_status_terminated_reason_oom_killed # pod metrics - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, Namespace, Service ], [ ClusterName, Namespace ], [ ClusterName, FullPodName, Namespace, PodName ] ] label_matchers: [ ] @@ -103,6 +94,15 @@ exporters: - pod_memory_limit - pod_cpu_limit - pod_cpu_request + - pod_container_status_running + - pod_container_status_terminated + - pod_container_status_waiting + - pod_container_status_waiting_reason_crash_loop_back_off + - pod_container_status_waiting_reason_image_pull_error + - pod_container_status_waiting_reason_start_error + - pod_container_status_waiting_reason_create_container_error + - pod_container_status_waiting_reason_create_container_config_error + - pod_container_status_terminated_reason_oom_killed # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 3cc73c82af..54cdb7fe87 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -31,15 +31,6 @@ exporters: - container_filesystem_usage - container_filesystem_available - container_filesystem_utilization - - container_status_running - - container_status_terminated - - container_status_waiting - - container_status_waiting_reason_crash_loop_back_off - - container_status_waiting_reason_image_pull_error - - container_status_waiting_reason_start_error - - container_status_waiting_reason_create_container_error - - container_status_waiting_reason_create_container_config_error - - container_status_terminated_reason_oom_killed # pod metrics - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, Namespace, Service ], [ ClusterName, Namespace ], [ ClusterName, FullPodName, Namespace, PodName ] ] label_matchers: [ ] @@ -56,7 +47,7 @@ exporters: - pod_interface_network_rx_dropped - pod_interface_network_tx_dropped - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, Service ] ] - label_matchers: [ ] + label_matchers: [] metric_name_selectors: - pod_cpu_reserved_capacity - pod_memory_reserved_capacity @@ -74,6 +65,15 @@ exporters: - pod_memory_limit - pod_cpu_limit - pod_cpu_request + - pod_container_status_running + - pod_container_status_terminated + - pod_container_status_waiting + - pod_container_status_waiting_reason_crash_loop_back_off + - pod_container_status_waiting_reason_image_pull_error + - pod_container_status_waiting_reason_start_error + - pod_container_status_waiting_reason_create_container_error + - pod_container_status_waiting_reason_create_container_config_error + - pod_container_status_terminated_reason_oom_killed # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 5b038168ff..664ab2127c 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -60,15 +60,6 @@ exporters: - container_filesystem_usage - container_filesystem_available - container_filesystem_utilization - - container_status_running - - container_status_terminated - - container_status_waiting - - container_status_waiting_reason_crash_loop_back_off - - container_status_waiting_reason_image_pull_error - - container_status_waiting_reason_start_error - - container_status_waiting_reason_create_container_error - - container_status_waiting_reason_create_container_config_error - - container_status_terminated_reason_oom_killed # pod metrics - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, Namespace, Service ], [ ClusterName, Namespace ], [ ClusterName, FullPodName, Namespace, PodName ] ] label_matchers: [ ] @@ -85,7 +76,7 @@ exporters: - pod_interface_network_rx_dropped - pod_interface_network_tx_dropped - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, Service ] ] - label_matchers: [ ] + label_matchers: [] metric_name_selectors: - pod_cpu_reserved_capacity - pod_memory_reserved_capacity @@ -103,6 +94,15 @@ exporters: - pod_memory_limit - pod_cpu_limit - pod_cpu_request + - pod_container_status_running + - pod_container_status_terminated + - pod_container_status_waiting + - pod_container_status_waiting_reason_crash_loop_back_off + - pod_container_status_waiting_reason_image_pull_error + - pod_container_status_waiting_reason_start_error + - pod_container_status_waiting_reason_create_container_error + - pod_container_status_waiting_reason_create_container_config_error + - pod_container_status_terminated_reason_oom_killed # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index eb083953ad..76d2f39ea5 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -63,9 +63,6 @@ func getContainerMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.Metric "container_cpu_utilization", "container_cpu_utilization_over_container_limit", "container_cpu_limit", "container_cpu_request", "container_memory_utilization", "container_memory_utilization_over_container_limit", "container_memory_failures_total", "container_memory_limit", "container_memory_request", "container_filesystem_usage", "container_filesystem_available", "container_filesystem_utilization", - "container_status_running", "container_status_terminated", "container_status_waiting", "container_status_waiting_reason_crash_loop_back_off", - "container_status_waiting_reason_image_pull_error", "container_status_waiting_reason_start_error", "container_status_waiting_reason_create_container_error", - "container_status_waiting_reason_create_container_config_error", "container_status_terminated_reason_oom_killed", }, } @@ -95,6 +92,9 @@ func getPodMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar selectors = append(selectors, []string{"pod_number_of_container_restarts", "pod_number_of_containers", "pod_number_of_running_containers", "pod_status_ready", "pod_status_scheduled", "pod_status_running", "pod_status_pending", "pod_status_failed", "pod_status_unknown", "pod_status_succeeded", "pod_memory_request", "pod_memory_limit", "pod_cpu_limit", "pod_cpu_request", + "pod_container_status_running", "pod_container_status_terminated", "pod_container_status_waiting", "pod_container_status_waiting_reason_crash_loop_back_off", + "pod_container_status_waiting_reason_image_pull_error", "pod_container_status_waiting_reason_start_error", "pod_container_status_waiting_reason_create_container_error", + "pod_container_status_waiting_reason_create_container_config_error", "pod_container_status_terminated_reason_oom_killed", }...) } diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index 72b0867bbf..8af6695ee7 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -270,9 +270,6 @@ func TestTranslator(t *testing.T) { "container_cpu_utilization", "container_cpu_utilization_over_container_limit", "container_cpu_limit", "container_cpu_request", "container_memory_utilization", "container_memory_utilization_over_container_limit", "container_memory_failures_total", "container_memory_limit", "container_memory_request", "container_filesystem_usage", "container_filesystem_available", "container_filesystem_utilization", - "container_status_running", "container_status_terminated", "container_status_waiting", "container_status_waiting_reason_crash_loop_back_off", - "container_status_waiting_reason_image_pull_error", "container_status_waiting_reason_start_error", "container_status_waiting_reason_create_container_error", - "container_status_waiting_reason_create_container_config_error", "container_status_terminated_reason_oom_killed", }, }, { @@ -295,6 +292,9 @@ func TestTranslator(t *testing.T) { MetricNameSelectors: []string{"pod_cpu_reserved_capacity", "pod_memory_reserved_capacity", "pod_number_of_container_restarts", "pod_number_of_containers", "pod_number_of_running_containers", "pod_status_ready", "pod_status_scheduled", "pod_status_running", "pod_status_pending", "pod_status_failed", "pod_status_unknown", "pod_status_succeeded", "pod_memory_request", "pod_memory_limit", "pod_cpu_limit", "pod_cpu_request", + "pod_container_status_running", "pod_container_status_terminated", "pod_container_status_waiting", "pod_container_status_waiting_reason_crash_loop_back_off", + "pod_container_status_waiting_reason_image_pull_error", "pod_container_status_waiting_reason_start_error", "pod_container_status_waiting_reason_create_container_error", + "pod_container_status_waiting_reason_create_container_config_error", "pod_container_status_terminated_reason_oom_killed", }, }, {