From 78f4c671a69ae0c9477c825e7c6af123ffd3919c Mon Sep 17 00:00:00 2001 From: Chad Patel Date: Tue, 26 Sep 2023 09:49:02 -0500 Subject: [PATCH] update enhanced CI metrics and aggregations and update tests --- .../base_container_insights_config.yaml | 6 +- .../sampleConfig/complete_darwin_config.yaml | 4 +- .../sampleConfig/complete_linux_config.yaml | 4 +- .../sampleConfig/complete_windows_config.yaml | 4 +- .../sampleConfig/config_with_env.yaml | 2 +- .../emf_and_kubernetes_config.yaml | 117 +++++++++++---- .../kubernetes_on_prem_config.yaml | 121 ++++++++++++---- .../sampleConfig/log_ecs_metric_only.yaml | 6 +- .../logs_and_kubernetes_config.yaml | 117 +++++++++++---- .../sampleConfig/prometheus_config_linux.yaml | 2 +- .../prometheus_config_windows.yaml | 2 +- .../sampleConfig/trace_config_linux.yaml | 2 +- .../sampleConfig/trace_config_windows.yaml | 2 +- translator/tocwconfig/tocwconfig_test.go | 1 + .../otel/exporter/awsemf/kubernetes.go | 131 +++++++++++++++-- .../otel/exporter/awsemf/translator_test.go | 136 ++++++++++++++---- 16 files changed, 520 insertions(+), 137 deletions(-) diff --git a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml index 2384ab5cee..7ecd23fe8f 100644 --- a/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml +++ b/translator/tocwconfig/sampleConfig/base_container_insights_config.yaml @@ -4,7 +4,7 @@ exporters: certificate_file_path: "" emf_only: true endpoint: "https://fake_endpoint" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -42,7 +42,7 @@ exporters: certificate_file_path: "" endpoint: "" enhanced_container_insights: false - "imds_retries": 1 + imds_retries: 1 local_mode: false retain_initial_value_of_delta_metric: false parse_json_encoded_attr_values: [ Sources, kubernetes ] @@ -144,7 +144,7 @@ receivers: enable_control_plane_metrics: false certificate_file_path: "" endpoint: "" - "imds_retries": 1 + imds_retries: 1 prefer_full_pod_name: true leader_lock_name: cwagent-clusterleader leader_lock_using_config_map_only: true diff --git a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml index ab62048dd0..5c6d95a9d9 100644 --- a/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_darwin_config.yaml @@ -20,7 +20,7 @@ exporters: emf_only: true certificate_file_path: "" endpoint: "https://logs-fips.us-west-2.amazonaws.com" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -49,7 +49,7 @@ exporters: aws_log_groups: [] certificate_file_path: "" endpoint: https://x-ray-endpoint.us-west-2.amazonaws.com - "imds_retries": 1 + imds_retries: 1 index_all_attributes: false indexed_attributes: [] local_mode: true diff --git a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml index e549b1fb0c..d55c341d43 100644 --- a/translator/tocwconfig/sampleConfig/complete_linux_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_linux_config.yaml @@ -23,7 +23,7 @@ exporters: emf_only: true certificate_file_path: "" endpoint: "https://logs-fips.us-west-2.amazonaws.com" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -52,7 +52,7 @@ exporters: aws_log_groups: [] certificate_file_path: "" endpoint: https://x-ray-endpoint.us-west-2.amazonaws.com - "imds_retries": 1 + imds_retries: 1 index_all_attributes: false indexed_attributes: [] local_mode: true diff --git a/translator/tocwconfig/sampleConfig/complete_windows_config.yaml b/translator/tocwconfig/sampleConfig/complete_windows_config.yaml index 16d0b40bc7..284b6113f2 100644 --- a/translator/tocwconfig/sampleConfig/complete_windows_config.yaml +++ b/translator/tocwconfig/sampleConfig/complete_windows_config.yaml @@ -20,7 +20,7 @@ exporters: certificate_file_path: "" emf_only: true endpoint: "https://logs-fips.us-west-2.amazonaws.com" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -49,7 +49,7 @@ exporters: aws_log_groups: [] certificate_file_path: "" endpoint: https://x-ray-endpoint.us-west-2.amazonaws.com - "imds_retries": 1 + imds_retries: 1 index_all_attributes: false indexed_attributes: [] local_mode: true diff --git a/translator/tocwconfig/sampleConfig/config_with_env.yaml b/translator/tocwconfig/sampleConfig/config_with_env.yaml index 227fcbfac4..f5863e139b 100644 --- a/translator/tocwconfig/sampleConfig/config_with_env.yaml +++ b/translator/tocwconfig/sampleConfig/config_with_env.yaml @@ -4,7 +4,7 @@ exporters: certificate_file_path: "" emf_only: true endpoint: "" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index efc671621b..b0f233bef0 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -4,7 +4,7 @@ exporters: emf_only: true certificate_file_path: "" endpoint: "https://fake_endpoint" - "imds_retries": 2 + imds_retries: 2 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -36,8 +36,8 @@ exporters: eks_fargate_container_insights_enabled: false certificate_file_path: "" endpoint: "" - "imds_retries": 2 enhanced_container_insights: true + imds_retries: 2 local_mode: false log_group_name: /aws/containerinsights/{ClusterName}/performance log_retention: 0 @@ -53,11 +53,20 @@ exporters: - 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_crashed + - 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: [ ] @@ -72,9 +81,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped - - pod_interface_network_rx_errors - pod_interface_network_tx_dropped - - pod_interface_network_tx_errors - dimensions: [ [ ClusterName, Namespace, PodName ], [ ClusterName ], [ ClusterName, FullPodName, Namespace, PodName ], [ ClusterName, Namespace, Service ] ] label_matchers: [] metric_name_selectors: @@ -90,6 +97,8 @@ exporters: - pod_status_failed - pod_status_unknown - pod_status_succeeded + - pod_memory_request + - pod_memory_limit # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] @@ -117,9 +126,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - node_interface_network_rx_dropped - - node_interface_network_rx_errors - node_interface_network_tx_dropped - - node_interface_network_tx_errors - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total # node fs metrics @@ -164,56 +171,118 @@ exporters: - dimensions: [ [ClusterName, endpoint], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: + - apiserver_storage_size_bytes + - apiserver_storage_size_bytes - etcd_db_total_size_in_bytes + - etcd_request_duration_seconds - dimensions: [ [ClusterName, resource], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - apiserver_storage_list_duration_seconds - - dimensions: [ [ClusterName, priority_level], [ ClusterName ] ] + - apiserver_longrunning_requests + - apiserver_storage_objects + - dimensions: [ [ClusterName, verb], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_flowcontrol_request_concurrency_limit - - dimensions: [ [ ClusterName ] ] + - apiserver_request_duration_seconds + - rest_client_request_duration_seconds + - dimensions: [ [ClusterName, code, verb], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_storage_objects - apiserver_request_total - apiserver_request_total_5xx - - apiserver_request_duration_seconds + - dimensions: [ [ClusterName, operation], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_admission_controller_admission_duration_seconds - - rest_client_request_duration_seconds - - rest_client_requests_total + - apiserver_admission_step_admission_duration_seconds - etcd_request_duration_seconds + - dimensions: [ [ClusterName, code, method], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - rest_client_requests_total + - dimensions: [ [ClusterName, request_kind], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_current_inflight_requests + - dimensions: [ [ClusterName, name], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_admission_webhook_admission_duration_seconds + - dimensions: [ [ClusterName, group], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_requested_deprecated_apis + - dimensions: [ [ClusterName, reason], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_flowcontrol_rejected_requests_total + - dimensions: [ [ ClusterName, priority_level ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_flowcontrol_request_concurrency_limit metric_descriptors: - - metric_name: apiserver_storage_objects + - metric_name: apiserver_admission_controller_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_step_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_webhook_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_current_inflight_requests unit: Count overwrite: true - - metric_name: apiserver_request_total + - metric_name: apiserver_current_inqueue_requests unit: Count overwrite: true - - metric_name: apiserver_request_total_5xx + - metric_name: apiserver_flowcontrol_rejected_requests_total + unit: Count + overwrite: true + - metric_name: apiserver_flowcontrol_request_concurrency_limit + unit: Count + overwrite: true + - metric_name: apiserver_longrunning_requests unit: Count overwrite: true - metric_name: apiserver_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_admission_controller_admission_duration_seconds + - metric_name: apiserver_request_total + unit: Count + overwrite: true + - metric_name: apiserver_request_total_5xx + unit: Count + overwrite: true + - metric_name: apiserver_storage_objects + unit: Count + overwrite: true + - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_request_duration_seconds + - metric_name: apiserver_storage_list_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_requests_total + - metric_name: apiserver_storage_objects unit: Count overwrite: true + - metric_name: apiserver_storage_db_total_size_in_bytes + unit: Bytes + overwrite: true + - metric_name: apiserver_storage_size_bytes + unit: Bytes + overwrite: true + - metric_name: etcd_db_total_size_in_bytes + unit: Bytes + overwrite: true - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_rejected_requests_total - unit: Count + - metric_name: rest_client_request_duration_seconds + unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_request_concurrency_limit + - metric_name: rest_client_requests_total unit: Count overwrite: true namespace: ContainerInsights @@ -270,7 +339,7 @@ receivers: enable_control_plane_metrics: true certificate_file_path: "" endpoint: "" - "imds_retries": 2 + imds_retries: 2 leader_lock_name: cwagent-clusterleader leader_lock_using_config_map_only: true local_mode: false diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index 9d9cf38de7..69af6a05f5 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -7,8 +7,8 @@ exporters: disable_metric_extraction: true eks_fargate_container_insights_enabled: false endpoint: "" - "imds_retries": 1 enhanced_container_insights: true + imds_retries: 1 local_mode: false log_group_name: /aws/containerinsights/{ClusterName}/performance log_retention: 0 @@ -24,11 +24,20 @@ exporters: - 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_crashed + - 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: [ ] @@ -43,11 +52,9 @@ exporters: label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped - - pod_interface_network_rx_errors - pod_interface_network_tx_dropped - - pod_interface_network_tx_errors - 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 @@ -61,6 +68,8 @@ exporters: - pod_status_failed - pod_status_unknown - pod_status_succeeded + - pod_memory_request + - pod_memory_limit # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] @@ -88,9 +97,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - node_interface_network_rx_dropped - - node_interface_network_rx_errors - node_interface_network_tx_dropped - - node_interface_network_tx_errors - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total # node fs metrics @@ -132,59 +139,121 @@ exporters: - cluster_failed_node_count - cluster_number_of_running_pods # control plane metrics - - dimensions: [ [ClusterName, endpoint], [ ClusterName ] ] + - dimensions: [ [ ClusterName, endpoint ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: + - apiserver_storage_size_bytes + - apiserver_storage_size_bytes - etcd_db_total_size_in_bytes - - dimensions: [ [ClusterName, resource], [ ClusterName ] ] + - etcd_request_duration_seconds + - dimensions: [ [ ClusterName, resource ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - apiserver_storage_list_duration_seconds - - dimensions: [ [ClusterName, priority_level], [ ClusterName ] ] + - apiserver_longrunning_requests + - apiserver_storage_objects + - dimensions: [ [ ClusterName, verb ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_flowcontrol_request_concurrency_limit - - dimensions: [ [ ClusterName ] ] + - apiserver_request_duration_seconds + - rest_client_request_duration_seconds + - dimensions: [ [ ClusterName, code, verb ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_storage_objects - apiserver_request_total - apiserver_request_total_5xx - - apiserver_request_duration_seconds + - dimensions: [ [ ClusterName, operation ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_admission_controller_admission_duration_seconds - - rest_client_request_duration_seconds - - rest_client_requests_total + - apiserver_admission_step_admission_duration_seconds - etcd_request_duration_seconds + - dimensions: [ [ ClusterName, code, method ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - rest_client_requests_total + - dimensions: [ [ ClusterName, request_kind ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_current_inflight_requests + - dimensions: [ [ ClusterName, name ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_admission_webhook_admission_duration_seconds + - dimensions: [ [ ClusterName, group ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_requested_deprecated_apis + - dimensions: [ [ ClusterName, reason ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_flowcontrol_rejected_requests_total + - dimensions: [ [ ClusterName, priority_level ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_flowcontrol_request_concurrency_limit metric_descriptors: - - metric_name: apiserver_storage_objects + - metric_name: apiserver_admission_controller_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_step_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_webhook_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_current_inflight_requests unit: Count overwrite: true - - metric_name: apiserver_request_total + - metric_name: apiserver_current_inqueue_requests unit: Count overwrite: true - - metric_name: apiserver_request_total_5xx + - metric_name: apiserver_flowcontrol_rejected_requests_total + unit: Count + overwrite: true + - metric_name: apiserver_flowcontrol_request_concurrency_limit + unit: Count + overwrite: true + - metric_name: apiserver_longrunning_requests unit: Count overwrite: true - metric_name: apiserver_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_admission_controller_admission_duration_seconds + - metric_name: apiserver_request_total + unit: Count + overwrite: true + - metric_name: apiserver_request_total_5xx + unit: Count + overwrite: true + - metric_name: apiserver_storage_objects + unit: Count + overwrite: true + - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_request_duration_seconds + - metric_name: apiserver_storage_list_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_requests_total + - metric_name: apiserver_storage_objects unit: Count overwrite: true + - metric_name: apiserver_storage_db_total_size_in_bytes + unit: Bytes + overwrite: true + - metric_name: apiserver_storage_size_bytes + unit: Bytes + overwrite: true + - metric_name: etcd_db_total_size_in_bytes + unit: Bytes + overwrite: true - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_rejected_requests_total - unit: Count + - metric_name: rest_client_request_duration_seconds + unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_request_concurrency_limit + - metric_name: rest_client_requests_total unit: Count overwrite: true namespace: ContainerInsights @@ -235,7 +304,7 @@ receivers: container_orchestrator: eks enable_control_plane_metrics: true endpoint: "" - "imds_retries": 1 + imds_retries: 1 leader_lock_name: cwagent-clusterleader leader_lock_using_config_map_only: true local_mode: true diff --git a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml index 7fc58646b2..7025cbffc6 100644 --- a/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml +++ b/translator/tocwconfig/sampleConfig/log_ecs_metric_only.yaml @@ -4,7 +4,7 @@ exporters: emf_only: true certificate_file_path: "" endpoint: "https://fake_endpoint" - "imds_retries": 1 + imds_retries: 1 local_mode: false log_group_name: emf/logs/default log_retention: 0 @@ -36,7 +36,7 @@ exporters: eks_fargate_container_insights_enabled: false certificate_file_path: "" endpoint: "" - "imds_retries": 1 + imds_retries: 1 enhanced_container_insights: false local_mode: false log_group_name: /aws/ecs/containerinsights/{ClusterName}/performance @@ -115,7 +115,7 @@ receivers: enable_control_plane_metrics: false certificate_file_path: "" endpoint: "" - "imds_retries": 1 + imds_retries: 1 leader_lock_name: otel-container-insight-clusterleader leader_lock_using_config_map_only: false local_mode: false diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 13421cbf89..b460f21958 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -53,11 +53,20 @@ exporters: - 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_crashed + - 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: [ ] @@ -72,11 +81,9 @@ exporters: label_matchers: [ ] metric_name_selectors: - pod_interface_network_rx_dropped - - pod_interface_network_rx_errors - pod_interface_network_tx_dropped - - pod_interface_network_tx_errors - 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 @@ -90,6 +97,8 @@ exporters: - pod_status_failed - pod_status_unknown - pod_status_succeeded + - pod_memory_request + - pod_memory_limit # node metrics - dimensions: [ [ ClusterName, InstanceId, NodeName ], [ ClusterName ] ] label_matchers: [ ] @@ -117,9 +126,7 @@ exporters: label_matchers: [ ] metric_name_selectors: - node_interface_network_rx_dropped - - node_interface_network_rx_errors - node_interface_network_tx_dropped - - node_interface_network_tx_errors - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total # node fs metrics @@ -161,59 +168,121 @@ exporters: - cluster_failed_node_count - cluster_number_of_running_pods # control plane metrics - - dimensions: [ [ClusterName, endpoint], [ ClusterName ] ] + - dimensions: [ [ ClusterName, endpoint ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: + - apiserver_storage_size_bytes + - apiserver_storage_size_bytes - etcd_db_total_size_in_bytes - - dimensions: [ [ClusterName, resource], [ ClusterName ] ] + - etcd_request_duration_seconds + - dimensions: [ [ ClusterName, resource ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - apiserver_storage_list_duration_seconds - - dimensions: [ [ClusterName, priority_level], [ ClusterName ] ] + - apiserver_longrunning_requests + - apiserver_storage_objects + - dimensions: [ [ ClusterName, verb ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_flowcontrol_request_concurrency_limit - - dimensions: [ [ ClusterName ] ] + - apiserver_request_duration_seconds + - rest_client_request_duration_seconds + - dimensions: [ [ ClusterName, code, verb ], [ ClusterName ] ] label_matchers: [ ] metric_name_selectors: - - apiserver_storage_objects - apiserver_request_total - apiserver_request_total_5xx - - apiserver_request_duration_seconds + - dimensions: [ [ ClusterName, operation ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_admission_controller_admission_duration_seconds - - rest_client_request_duration_seconds - - rest_client_requests_total + - apiserver_admission_step_admission_duration_seconds - etcd_request_duration_seconds + - dimensions: [ [ ClusterName, code, method ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - rest_client_requests_total + - dimensions: [ [ ClusterName, request_kind ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_current_inflight_requests + - dimensions: [ [ ClusterName, name ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_admission_webhook_admission_duration_seconds + - dimensions: [ [ ClusterName, group ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_requested_deprecated_apis + - dimensions: [ [ ClusterName, reason ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: - apiserver_flowcontrol_rejected_requests_total + - dimensions: [ [ ClusterName, priority_level ], [ ClusterName ] ] + label_matchers: [ ] + metric_name_selectors: + - apiserver_flowcontrol_request_concurrency_limit metric_descriptors: - - metric_name: apiserver_storage_objects + - metric_name: apiserver_admission_controller_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_step_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_admission_webhook_admission_duration_seconds + unit: Seconds + overwrite: true + - metric_name: apiserver_current_inflight_requests unit: Count overwrite: true - - metric_name: apiserver_request_total + - metric_name: apiserver_current_inqueue_requests unit: Count overwrite: true - - metric_name: apiserver_request_total_5xx + - metric_name: apiserver_flowcontrol_rejected_requests_total + unit: Count + overwrite: true + - metric_name: apiserver_flowcontrol_request_concurrency_limit + unit: Count + overwrite: true + - metric_name: apiserver_longrunning_requests unit: Count overwrite: true - metric_name: apiserver_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_admission_controller_admission_duration_seconds + - metric_name: apiserver_request_total + unit: Count + overwrite: true + - metric_name: apiserver_request_total_5xx + unit: Count + overwrite: true + - metric_name: apiserver_storage_objects + unit: Count + overwrite: true + - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_request_duration_seconds + - metric_name: apiserver_storage_list_duration_seconds unit: Seconds overwrite: true - - metric_name: rest_client_requests_total + - metric_name: apiserver_storage_objects unit: Count overwrite: true + - metric_name: apiserver_storage_db_total_size_in_bytes + unit: Bytes + overwrite: true + - metric_name: apiserver_storage_size_bytes + unit: Bytes + overwrite: true + - metric_name: etcd_db_total_size_in_bytes + unit: Bytes + overwrite: true - metric_name: etcd_request_duration_seconds unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_rejected_requests_total - unit: Count + - metric_name: rest_client_request_duration_seconds + unit: Seconds overwrite: true - - metric_name: apiserver_flowcontrol_request_concurrency_limit + - metric_name: rest_client_requests_total unit: Count overwrite: true namespace: ContainerInsights diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml index 75b0e082e3..0324968b89 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_linux.yaml @@ -9,7 +9,7 @@ exporters: eks_fargate_container_insights_enabled: false certificate_file_path: "" endpoint: "" - "imds_retries": 1 + imds_retries: 1 enhanced_container_insights: false local_mode: false log_group_name: /aws/ecs/containerinsights/TestCluster/prometheus diff --git a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml index cf1f191a3b..ccd84ea2fb 100644 --- a/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/prometheus_config_windows.yaml @@ -9,7 +9,7 @@ exporters: eks_fargate_container_insights_enabled: false certificate_file_path: "" endpoint: "" - "imds_retries": 1 + imds_retries: 1 enhanced_container_insights: false local_mode: false log_group_name: /aws/ecs/containerinsights/TestCluster/prometheus diff --git a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml index 5ad59a485b..8299964997 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_linux.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_linux.yaml @@ -4,7 +4,7 @@ exporters: aws_log_groups: [] certificate_file_path: "" endpoint: "" - "imds_retries": 2 + imds_retries: 2 index_all_attributes: false indexed_attributes: [] local_mode: false diff --git a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml index 18ed799e2f..8b6738d027 100644 --- a/translator/tocwconfig/sampleConfig/trace_config_windows.yaml +++ b/translator/tocwconfig/sampleConfig/trace_config_windows.yaml @@ -4,7 +4,7 @@ exporters: aws_log_groups: [] certificate_file_path: "" endpoint: "" - "imds_retries": 2 + imds_retries: 2 index_all_attributes: false indexed_attributes: [] local_mode: false diff --git a/translator/tocwconfig/tocwconfig_test.go b/translator/tocwconfig/tocwconfig_test.go index fffa845d8c..1c0e010c27 100644 --- a/translator/tocwconfig/tocwconfig_test.go +++ b/translator/tocwconfig/tocwconfig_test.go @@ -350,6 +350,7 @@ func verifyToYamlTranslation(t *testing.T, input interface{}, expectedYamlFilePa return pretty.Sprint(x) < pretty.Sprint(y) }) // assert.Equal(t, expected, actual) // this is useful for debugging differences between the YAML + require.True(t, cmp.Equal(expected, actual, opt), "D! YAML diff: %s", cmp.Diff(expected, actual)) } } diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index 7fcc247a16..d9ae7a7674 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -61,8 +61,11 @@ func getContainerMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.Metric Dimensions: [][]string{{"ClusterName"}, {"ContainerName", "FullPodName", "PodName", "Namespace", "ClusterName"}, {"ContainerName", "PodName", "Namespace", "ClusterName"}}, MetricNameSelectors: []string{ "container_cpu_utilization", "container_cpu_utilization_over_container_limit", - "container_memory_utilization", "container_memory_utilization_over_container_limit", "container_memory_failures_total", - "container_filesystem_usage", "container_status_running", "container_status_terminated", "container_status_waiting", "container_status_waiting_reason_crashed", + "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", }, } @@ -91,7 +94,7 @@ func getPodMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar podMetricDeclarations[0].Dimensions = append(podMetricDeclarations[0].Dimensions, []string{"FullPodName", "PodName", "Namespace", "ClusterName"}) 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_status_succeeded", "pod_memory_request", "pod_memory_limit"}...) } @@ -110,7 +113,7 @@ func getPodMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDeclar {"Service", "Namespace", "ClusterName"}, {"ClusterName"}, }, - MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_rx_errors", "pod_interface_network_tx_dropped", "pod_interface_network_tx_errors"}, + MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_tx_dropped"}, }, ) } else { @@ -147,9 +150,9 @@ func getNodeMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDecla {"ClusterName"}, }, MetricNameSelectors: []string{ - "node_interface_network_rx_dropped", "node_interface_network_rx_errors", - "node_interface_network_tx_dropped", "node_interface_network_tx_errors", - "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total"}, + "node_interface_network_rx_dropped", "node_interface_network_tx_dropped", + "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total", + }, }, } } else { @@ -266,35 +269,78 @@ func getControlPlaneMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.Met { Dimensions: [][]string{{"ClusterName", "endpoint"}, {"ClusterName"}}, MetricNameSelectors: []string{ + "apiserver_storage_size_bytes", + "apiserver_storage_size_bytes", "etcd_db_total_size_in_bytes", + "etcd_request_duration_seconds", }, }, { Dimensions: [][]string{{"ClusterName", "resource"}, {"ClusterName"}}, MetricNameSelectors: []string{ "apiserver_storage_list_duration_seconds", + "apiserver_longrunning_requests", + "apiserver_storage_objects", }, }, { - Dimensions: [][]string{{"ClusterName", "priority_level"}, {"ClusterName"}}, + Dimensions: [][]string{{"ClusterName", "verb"}, {"ClusterName"}}, MetricNameSelectors: []string{ - "apiserver_flowcontrol_request_concurrency_limit", + "apiserver_request_duration_seconds", + "rest_client_request_duration_seconds", }, }, { - Dimensions: [][]string{{"ClusterName"}}, + Dimensions: [][]string{{"ClusterName", "code", "verb"}, {"ClusterName"}}, MetricNameSelectors: []string{ - "apiserver_admission_controller_admission_duration_seconds", - "apiserver_flowcontrol_rejected_requests_total", - "apiserver_request_duration_seconds", "apiserver_request_total", "apiserver_request_total_5xx", - "apiserver_storage_objects", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "operation"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_admission_controller_admission_duration_seconds", + "apiserver_admission_step_admission_duration_seconds", "etcd_request_duration_seconds", - "rest_client_request_duration_seconds", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "code", "method"}, {"ClusterName"}}, + MetricNameSelectors: []string{ "rest_client_requests_total", }, }, + { + Dimensions: [][]string{{"ClusterName", "request_kind"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_current_inflight_requests", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "name"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_admission_webhook_admission_duration_seconds", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "group"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_requested_deprecated_apis", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "reason"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_flowcontrol_rejected_requests_total", + }, + }, + { + Dimensions: [][]string{{"ClusterName", "priority_level"}, {"ClusterName"}}, + MetricNameSelectors: []string{ + "apiserver_flowcontrol_request_concurrency_limit", + }, + }, }...) } return metricDeclarations @@ -310,6 +356,26 @@ func getControlPlaneMetricDescriptors(conf *confmap.Conf) []awsemfexporter.Metri Unit: "Seconds", Overwrite: true, }, + { + MetricName: "apiserver_admission_step_admission_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_admission_webhook_admission_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_current_inflight_requests", + Unit: "Count", + Overwrite: true, + }, + { + MetricName: "apiserver_current_inqueue_requests", + Unit: "Count", + Overwrite: true, + }, { MetricName: "apiserver_flowcontrol_rejected_requests_total", Unit: "Count", @@ -320,6 +386,11 @@ func getControlPlaneMetricDescriptors(conf *confmap.Conf) []awsemfexporter.Metri Unit: "Count", Overwrite: true, }, + { + MetricName: "apiserver_longrunning_requests", + Unit: "Count", + Overwrite: true, + }, { MetricName: "apiserver_request_duration_seconds", Unit: "Seconds", @@ -345,6 +416,36 @@ func getControlPlaneMetricDescriptors(conf *confmap.Conf) []awsemfexporter.Metri Unit: "Seconds", Overwrite: true, }, + { + MetricName: "apiserver_storage_list_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_objects", + Unit: "Count", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_db_total_size_in_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_size_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "etcd_db_total_size_in_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "etcd_request_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, { MetricName: "rest_client_request_duration_seconds", Unit: "Seconds", diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index b6243ffb6a..e935dcb231 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -268,8 +268,12 @@ func TestTranslator(t *testing.T) { Dimensions: [][]string{{"ClusterName"}, {"ContainerName", "FullPodName", "PodName", "Namespace", "ClusterName"}, {"ContainerName", "PodName", "Namespace", "ClusterName"}}, MetricNameSelectors: []string{ "container_cpu_utilization", "container_cpu_utilization_over_container_limit", - "container_memory_utilization", "container_memory_utilization_over_container_limit", "container_memory_failures_total", - "container_filesystem_usage", "container_status_running", "container_status_terminated", "container_status_waiting", "container_status_waiting_reason_crashed"}, + "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", + }, }, { Dimensions: [][]string{{"PodName", "Namespace", "ClusterName"}, {"ClusterName"}, {"Service", "Namespace", "ClusterName"}, {"ClusterName", "Namespace"}, {"FullPodName", "PodName", "Namespace", "ClusterName"}}, @@ -277,15 +281,6 @@ func TestTranslator(t *testing.T) { "pod_network_rx_bytes", "pod_network_tx_bytes", "pod_cpu_utilization_over_pod_limit", "pod_memory_utilization_over_pod_limit"}, }, - { - Dimensions: [][]string{{"PodName", "Namespace", "ClusterName"}, {"ClusterName"}, {"FullPodName", "PodName", "Namespace", "ClusterName"}, {"Service", "Namespace", "ClusterName"}}, - 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"}, - }, { Dimensions: [][]string{ {"FullPodName", "PodName", "Namespace", "ClusterName"}, @@ -293,7 +288,14 @@ func TestTranslator(t *testing.T) { {"Service", "Namespace", "ClusterName"}, {"ClusterName"}, }, - MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_rx_errors", "pod_interface_network_tx_dropped", "pod_interface_network_tx_errors"}, + MetricNameSelectors: []string{"pod_interface_network_rx_dropped", "pod_interface_network_tx_dropped"}, + }, + { + Dimensions: [][]string{{"PodName", "Namespace", "ClusterName"}, {"ClusterName"}, {"FullPodName", "PodName", "Namespace", "ClusterName"}, {"Service", "Namespace", "ClusterName"}}, + 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", + }, }, { Dimensions: [][]string{{"NodeName", "InstanceId", "ClusterName"}, {"ClusterName"}}, @@ -310,8 +312,7 @@ func TestTranslator(t *testing.T) { {"ClusterName"}, }, MetricNameSelectors: []string{ - "node_interface_network_rx_dropped", "node_interface_network_rx_errors", - "node_interface_network_tx_dropped", "node_interface_network_tx_errors", + "node_interface_network_rx_dropped", "node_interface_network_tx_dropped", "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total"}, }, { @@ -340,29 +341,47 @@ func TestTranslator(t *testing.T) { }, { Dimensions: [][]string{{"ClusterName", "endpoint"}, {"ClusterName"}}, - MetricNameSelectors: []string{"etcd_db_total_size_in_bytes"}, + MetricNameSelectors: []string{"apiserver_storage_size_bytes", "apiserver_storage_size_bytes", "etcd_db_total_size_in_bytes", "etcd_request_duration_seconds"}, }, { Dimensions: [][]string{{"ClusterName", "resource"}, {"ClusterName"}}, - MetricNameSelectors: []string{"apiserver_storage_list_duration_seconds"}, + MetricNameSelectors: []string{"apiserver_storage_list_duration_seconds", "apiserver_longrunning_requests", "apiserver_storage_objects"}, }, { - Dimensions: [][]string{{"ClusterName", "priority_level"}, {"ClusterName"}}, - MetricNameSelectors: []string{"apiserver_flowcontrol_request_concurrency_limit"}, + Dimensions: [][]string{{"ClusterName", "verb"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_request_duration_seconds", "rest_client_request_duration_seconds"}, }, { - Dimensions: [][]string{{"ClusterName"}}, - MetricNameSelectors: []string{ - "apiserver_admission_controller_admission_duration_seconds", - "apiserver_flowcontrol_rejected_requests_total", - "apiserver_request_duration_seconds", - "apiserver_request_total", - "apiserver_request_total_5xx", - "apiserver_storage_objects", - "etcd_request_duration_seconds", - "rest_client_request_duration_seconds", - "rest_client_requests_total", - }, + Dimensions: [][]string{{"ClusterName", "code", "verb"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_request_total", "apiserver_request_total_5xx"}, + }, + { + Dimensions: [][]string{{"ClusterName", "operation"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_admission_controller_admission_duration_seconds", "apiserver_admission_step_admission_duration_seconds", "etcd_request_duration_seconds"}, + }, + { + Dimensions: [][]string{{"ClusterName", "code", "method"}, {"ClusterName"}}, + MetricNameSelectors: []string{"rest_client_requests_total"}, + }, + { + Dimensions: [][]string{{"ClusterName", "request_kind"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_current_inflight_requests"}, + }, + { + Dimensions: [][]string{{"ClusterName", "name"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_admission_webhook_admission_duration_seconds"}, + }, + { + Dimensions: [][]string{{"ClusterName", "group"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_requested_deprecated_apis"}, + }, + { + Dimensions: [][]string{{"ClusterName", "reason"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_flowcontrol_rejected_requests_total"}, + }, + { + Dimensions: [][]string{{"ClusterName", "priority_level"}, {"ClusterName"}}, + MetricNameSelectors: []string{"apiserver_flowcontrol_request_concurrency_limit"}, }, }, "metric_descriptors": []awsemfexporter.MetricDescriptor{ @@ -372,7 +391,22 @@ func TestTranslator(t *testing.T) { Overwrite: true, }, { - MetricName: "apiserver_flowcontrol_request_concurrency_limit", + MetricName: "apiserver_admission_step_admission_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_admission_webhook_admission_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_current_inflight_requests", + Unit: "Count", + Overwrite: true, + }, + { + MetricName: "apiserver_current_inqueue_requests", Unit: "Count", Overwrite: true, }, @@ -381,6 +415,16 @@ func TestTranslator(t *testing.T) { Unit: "Count", Overwrite: true, }, + { + MetricName: "apiserver_flowcontrol_request_concurrency_limit", + Unit: "Count", + Overwrite: true, + }, + { + MetricName: "apiserver_longrunning_requests", + Unit: "Count", + Overwrite: true, + }, { MetricName: "apiserver_request_duration_seconds", Unit: "Seconds", @@ -406,6 +450,36 @@ func TestTranslator(t *testing.T) { Unit: "Seconds", Overwrite: true, }, + { + MetricName: "apiserver_storage_list_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_objects", + Unit: "Count", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_db_total_size_in_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "apiserver_storage_size_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "etcd_db_total_size_in_bytes", + Unit: "Bytes", + Overwrite: true, + }, + { + MetricName: "etcd_request_duration_seconds", + Unit: "Seconds", + Overwrite: true, + }, { MetricName: "rest_client_request_duration_seconds", Unit: "Seconds",