From 74398de60b09ebf7e8a7ce1200f80e77ad6d27c8 Mon Sep 17 00:00:00 2001 From: Reham Tarek Date: Mon, 19 Aug 2024 12:40:41 +0100 Subject: [PATCH] Add hyperpod metrics --- .../tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml | 4 ++++ .../sampleConfig/emf_and_kubernetes_with_gpu_config.yaml | 4 ++++ .../tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml | 4 ++++ .../tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml | 4 ++++ translator/translate/otel/exporter/awsemf/kubernetes.go | 2 ++ translator/translate/otel/exporter/awsemf/translator_test.go | 5 ++++- 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml index 9de5eab73d..4e708dc83a 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_config.yaml @@ -181,6 +181,10 @@ exporters: - node_interface_network_tx_dropped - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total + - hyper_pod_node_health_status_schedulable + - hyper_pod_node_health_status_unschedulable_pending_replacement + - hyper_pod_node_health_status_unschedulable_pending_reboot + - hyper_pod_node_health_status_unschedulable - dimensions: - - ClusterName - InstanceId diff --git a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml index bce07e028b..b87af1cda9 100644 --- a/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml +++ b/translator/tocwconfig/sampleConfig/emf_and_kubernetes_with_gpu_config.yaml @@ -188,6 +188,10 @@ exporters: - node_interface_network_tx_dropped - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total + - hyper_pod_node_health_status_schedulable + - hyper_pod_node_health_status_unschedulable_pending_replacement + - hyper_pod_node_health_status_unschedulable_pending_reboot + - hyper_pod_node_health_status_unschedulable - dimensions: - - ClusterName - InstanceId diff --git a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml index f08832cedf..c01e8fbe00 100644 --- a/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml +++ b/translator/tocwconfig/sampleConfig/kubernetes_on_prem_config.yaml @@ -148,6 +148,10 @@ exporters: - node_interface_network_tx_dropped - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total + - hyper_pod_node_health_status_schedulable + - hyper_pod_node_health_status_unschedulable_pending_replacement + - hyper_pod_node_health_status_unschedulable_pending_reboot + - hyper_pod_node_health_status_unschedulable - dimensions: - - ClusterName - InstanceId diff --git a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml index 0e8e1011c1..dfe8901351 100644 --- a/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml +++ b/translator/tocwconfig/sampleConfig/logs_and_kubernetes_config.yaml @@ -179,6 +179,10 @@ exporters: - node_interface_network_tx_dropped - node_diskio_io_service_bytes_total - node_diskio_io_serviced_total + - hyper_pod_node_health_status_schedulable + - hyper_pod_node_health_status_unschedulable_pending_replacement + - hyper_pod_node_health_status_unschedulable_pending_reboot + - hyper_pod_node_health_status_unschedulable - dimensions: - - ClusterName - InstanceId diff --git a/translator/translate/otel/exporter/awsemf/kubernetes.go b/translator/translate/otel/exporter/awsemf/kubernetes.go index 0fc5c79ad5..a98835932c 100644 --- a/translator/translate/otel/exporter/awsemf/kubernetes.go +++ b/translator/translate/otel/exporter/awsemf/kubernetes.go @@ -168,6 +168,8 @@ func getNodeMetricDeclarations(conf *confmap.Conf) []*awsemfexporter.MetricDecla MetricNameSelectors: []string{ "node_interface_network_rx_dropped", "node_interface_network_tx_dropped", "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total", + "hyper_pod_node_health_status_schedulable", "hyper_pod_node_health_status_unschedulable_pending_replacement", + "hyper_pod_node_health_status_unschedulable_pending_reboot", "hyper_pod_node_health_status_unschedulable", }, }, } diff --git a/translator/translate/otel/exporter/awsemf/translator_test.go b/translator/translate/otel/exporter/awsemf/translator_test.go index b90367039c..a038b8e561 100644 --- a/translator/translate/otel/exporter/awsemf/translator_test.go +++ b/translator/translate/otel/exporter/awsemf/translator_test.go @@ -329,7 +329,10 @@ func TestTranslator(t *testing.T) { }, MetricNameSelectors: []string{ "node_interface_network_rx_dropped", "node_interface_network_tx_dropped", - "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total"}, + "node_diskio_io_service_bytes_total", "node_diskio_io_serviced_total", + "hyper_pod_node_health_status_schedulable", "hyper_pod_node_health_status_unschedulable_pending_replacement", + "hyper_pod_node_health_status_unschedulable_pending_reboot", + "hyper_pod_node_health_status_unschedulable"}, }, { Dimensions: [][]string{{"NodeName", "InstanceId", "ClusterName"}, {"ClusterName"}},