From c83a0b114269d9d55500256cd46089592981ae47 Mon Sep 17 00:00:00 2001 From: POOJA REDDY NATHALA Date: Tue, 15 Aug 2023 13:44:36 -0400 Subject: [PATCH] Merge the latest of dev into apm branch (#79) * added units for Pod status metrics (#77) Adding Units for pod status Failed, Pending and Succeeded metrics * Adding apiserver_storage_list_duration_seconds at cluster and resource level (#71) * Adding apiserver_storage_list_duration_seconds at cluster and resource level --------- Co-authored-by: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> --- internal/aws/containerinsight/const.go | 3 +++ receiver/awscontainerinsightreceiver/README.md | 16 +++++++++++++++- .../internal/k8sapiserver/prometheus_scraper.go | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/internal/aws/containerinsight/const.go b/internal/aws/containerinsight/const.go index 20ef66f29193..704e53a56865 100644 --- a/internal/aws/containerinsight/const.go +++ b/internal/aws/containerinsight/const.go @@ -263,6 +263,9 @@ func init() { StatusTerminated: UnitCount, StatusWaiting: UnitCount, StatusWaitingReasonCrashed: UnitCount, + StatusFailed: UnitCount, + StatusPending: UnitCount, + StatusSucceeded: UnitCount, StatusUnknown: UnitCount, StatusReady: UnitCount, StatusScheduled: UnitCount, diff --git a/receiver/awscontainerinsightreceiver/README.md b/receiver/awscontainerinsightreceiver/README.md index 46cacd5abadb..0ef843836691 100644 --- a/receiver/awscontainerinsightreceiver/README.md +++ b/receiver/awscontainerinsightreceiver/README.md @@ -415,7 +415,6 @@ kubectl apply -f config.yaml |-----------------------------|-------| | etcd_db_total_size_in_bytes | bytes | -

| Resource Attribute | |--------------------| @@ -429,6 +428,21 @@ kubectl apply -f config.yaml

+### Cluster Resources +| Metric | Unit | +|-----------------------------------------|---------| +| apiserver_storage_list_duration_seconds | Seconds | + +

+| Resource Attribute | +|--------------------| +| ClusterName | +| NodeName | +| Type | +| Timestamp | +| Version | +| Sources | + ### Cluster Deployment | Metric | Unit | |-----------------------------|-------| diff --git a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/prometheus_scraper.go b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/prometheus_scraper.go index 2c2c2057d748..6985dbf1c420 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/prometheus_scraper.go +++ b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/prometheus_scraper.go @@ -51,6 +51,7 @@ var ( "rest_client_requests_total", "etcd_request_duration_seconds.*", "etcd_db_total_size_in_bytes.*", + "apiserver_storage_list_duration_seconds.*", } )