Skip to content

Commit fb65f2d

Browse files
author
Ankit Patel
committed
rename metric cuz forked
1 parent 6ce27bf commit fb65f2d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/pod-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
| kube_pod_labels | Gauge | Kubernetes labels converted to Prometheus labels | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `label_POD_LABEL`=&lt;POD_LABEL&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
1111
| kube_pod_status_phase | Gauge | The pods current phase | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `phase`=&lt;Pending\|Running\|Succeeded\|Failed\|Unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
1212
| kube_pod_status_ready | Gauge | Describes whether the pod is ready to serve requests | | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
13-
| kube_pod_status_ready_time | Gauge | Time when pod passed readiness probes. | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
13+
| affirm_kube_pod_status_ready_time | Gauge | Time when pod passed readiness probes. | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
1414
| kube_pod_status_containers_ready_time | Gauge | Time when pod containers entered Ready state. | seconds | `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
1515
| kube_pod_status_scheduled | Gauge | Describes the status of the scheduling process for the pod | |`pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `condition`=&lt;true\|false\|unknown&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |
1616
| kube_pod_container_info | Gauge | Information about a container in a pod | | `container`=&lt;container-name&gt; <br> `pod`=&lt;pod-name&gt; <br> `namespace`=&lt;pod-namespace&gt; <br> `image`=&lt;image-name&gt; <br> `image_id`=&lt;image-id&gt; <br> `image_spec`=&lt;image-spec&gt; <br> `container_id`=&lt;containerid&gt; <br> `uid`=&lt;pod-uid&gt; | STABLE |

internal/store/pod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ func createPodStatusReadyFamilyGenerator() generator.FamilyGenerator {
12801280

12811281
func createPodStatusReadyTimeFamilyGenerator() generator.FamilyGenerator {
12821282
return *generator.NewFamilyGenerator(
1283-
"kube_pod_status_ready_time",
1283+
"affirm_kube_pod_status_ready_time",
12841284
"Readiness achieved time in unix timestamp for a pod.",
12851285
metric.Gauge,
12861286
"",

internal/store/pod_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,10 +1375,10 @@ func TestPodStore(t *testing.T) {
13751375
},
13761376
Want: `
13771377
# HELP kube_pod_status_ready Describes whether the pod is ready to serve requests.
1378-
# HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
1378+
# HELP affirm_kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
13791379
# TYPE kube_pod_status_ready gauge
1380-
# TYPE kube_pod_status_ready_time gauge
1381-
kube_pod_status_ready_time{namespace="ns1",pod="pod1",uid="uid1"} 1.501666018e+09
1380+
# TYPE affirm_kube_pod_status_ready_time gauge
1381+
affirm_kube_pod_status_ready_time{namespace="ns1",pod="pod1",uid="uid1"} 1.501666018e+09
13821382
kube_pod_status_ready{condition="false",namespace="ns1",pod="pod1",uid="uid1"} 0
13831383
kube_pod_status_ready{condition="true",namespace="ns1",pod="pod1",uid="uid1"} 1
13841384
kube_pod_status_ready{condition="unknown",namespace="ns1",pod="pod1",uid="uid1"} 0
@@ -1406,10 +1406,10 @@ func TestPodStore(t *testing.T) {
14061406
},
14071407
Want: `
14081408
# HELP kube_pod_status_ready Describes whether the pod is ready to serve requests.
1409-
# HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
1409+
# HELP affirm_kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
14101410
# TYPE kube_pod_status_ready gauge
1411-
# TYPE kube_pod_status_ready_time gauge
1412-
kube_pod_status_ready_time{namespace="ns2",pod="pod2",uid="uid2"} 1.501666018e+09
1411+
# TYPE affirm_kube_pod_status_ready_time gauge
1412+
affirm_kube_pod_status_ready_time{namespace="ns2",pod="pod2",uid="uid2"} 1.501666018e+09
14131413
kube_pod_status_ready{condition="false",namespace="ns2",pod="pod2",uid="uid2"} 1
14141414
kube_pod_status_ready{condition="true",namespace="ns2",pod="pod2",uid="uid2"} 0
14151415
kube_pod_status_ready{condition="unknown",namespace="ns2",pod="pod2",uid="uid2"} 0

main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func TestFullScrapeCycle(t *testing.T) {
211211
# HELP kube_pod_status_containers_ready_time Readiness achieved time in unix timestamp for a pod containers.
212212
# HELP kube_pod_status_phase The pods current phase.
213213
# HELP kube_pod_status_ready Describes whether the pod is ready to serve requests.
214-
# HELP kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
214+
# HELP affirm_kube_pod_status_ready_time Readiness achieved time in unix timestamp for a pod.
215215
# HELP kube_pod_status_reason The pod status reasons
216216
# HELP kube_pod_status_scheduled Describes the status of the scheduling process for the pod.
217217
# HELP kube_pod_status_scheduled_time Unix timestamp when pod moved into scheduled status
@@ -256,7 +256,7 @@ func TestFullScrapeCycle(t *testing.T) {
256256
# TYPE kube_pod_status_containers_ready_time gauge
257257
# TYPE kube_pod_status_phase gauge
258258
# TYPE kube_pod_status_ready gauge
259-
# TYPE kube_pod_status_ready_time gauge
259+
# TYPE affirm_kube_pod_status_ready_time gauge
260260
# TYPE kube_pod_status_reason gauge
261261
# TYPE kube_pod_status_scheduled gauge
262262
# TYPE kube_pod_status_scheduled_time gauge

0 commit comments

Comments
 (0)