# Setting up Kubernetes Alerts - some k8 metrics missing

**URL:** <https://discuss.elastic.co/t/setting-up-kubernetes-alerts-some-k8-metrics-missing/360975>\
**Category:** Elastic Observability\
**Created:** [June 6, 2024, 2:10pm UTC](https://discuss.elastic.co/t/setting-up-kubernetes-alerts-some-k8-metrics-missing/360975 "2024-06-06T14:10:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djarami726](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djarami726/32/108821_2.png) [@djarami726](https://discuss.elastic.co/u/djarami726)\
**Post date:** [June 6, 2024, 2:10pm UTC](https://discuss.elastic.co/t/setting-up-kubernetes-alerts-some-k8-metrics-missing/360975/1 "2024-06-06T14:10:21Z")

</div>

I'm on Elastic 8.13.4, using the kubernetes integration to collect the metrics. I'm creating a series alerts equivalent to these prometheus kubernetes alerts: [Awesome Prometheus alerts | Collection of alerting rules](https://samber.github.io/awesome-prometheus-alerts/rules.html#rule-kubernetes-1-23) and I've had to find the equivalent metric on the elastic side. However, I have found a number of metrics that I can't find in any of the data.

Some of these metrics are:  
kube\_deployment\_status\_observed\_generation,  
kube\_deployment\_metadata\_generation,  
kube\_statefulset\_status\_current\_revision, kube\_statefulset\_status\_update\_revision,  
kube\_daemonset\_status\_number\_misscheduled,  
kube\_job\_spec\_completions,  
kube\_job\_status\_succeeded,  
kube\_job\_status\_failed,  
rest\_client\_requests\_total

I can see references to these metrics in a elastic beats file but I don't know if this means that beats is collecting these or not.

> <https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/KSM/ksm.v2.12.0.plain>

I need some help on where to confirm / configure to get the metrics collected and stored in the index.

Appreciate any help.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 7, 2024, 5:42am UTC](https://discuss.elastic.co/t/setting-up-kubernetes-alerts-some-k8-metrics-missing/360975/2 "2024-06-07T05:42:07Z")

</div>

> [@djarami726](#):
>
> kube\_deployment\_status\_observed\_generation

Hi @djarami726

Assuming you are running KSM... I think the `_` are replaced with dots... I did not find all but I see most. And of course they will not show up if you are not generating them

Example

 ![Screenshot 2024-06-06 at 10.39.54 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1a2a85b277c396790311dae9c2c1202710fd9c5d.jpeg)

---

<div class="post-metadata">

**Author:** ![djarami726](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djarami726/32/108821_2.png) [@djarami726](https://discuss.elastic.co/u/djarami726)\
**Post date:** [June 17, 2024, 6:03pm UTC](https://discuss.elastic.co/t/setting-up-kubernetes-alerts-some-k8-metrics-missing/360975/3 "2024-06-17T18:03:16Z")

</div>

Thank you for response. I was able to find the two that you mentioned above, but there are others that don't seem to be coming through the pipeline and I've been able that they are accessable from the kubernetes side.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/6/26f7580d5fed36534635985d63966538b77874a2.png)

Yes, I did look for them with the . instead of the \_ and all kinds of similarity searching too.

Here is a list of the metrics I wasn't able to find:  
kube\_deployment\_status\_observed\_generation  
kube\_deployment\_metadata\_generation  
kube\_statefulset\_status\_current\_revision  
kube\_statefulset\_status\_update\_revision  
kube\_daemonset\_status\_number\_misscheduled  
kube\_job\_spec\_completions  
kube\_job\_status\_succeeded  
kube\_job\_status\_failed  
rest\_client\_requests\_total  
apiserver\_client\_certificate\_expiration\_seconds\_count

Thanks for your help
