# How to setup an alert for a failing livesness probe in kubernetes

**URL:** <https://discuss.elastic.co/t/how-to-setup-an-alert-for-a-failing-livesness-probe-in-kubernetes/125755>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 27, 2018, 12:50pm UTC](https://discuss.elastic.co/t/how-to-setup-an-alert-for-a-failing-livesness-probe-in-kubernetes/125755 "2018-03-27T12:50:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Michael\_Gang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_michael_gang/32/114738_2.png) [@David\_Michael\_Gang](https://discuss.elastic.co/u/David_Michael_Gang)\
**Post date:** [March 27, 2018, 12:50pm UTC](https://discuss.elastic.co/t/how-to-setup-an-alert-for-a-failing-livesness-probe-in-kubernetes/125755/1 "2018-03-27T12:50:45Z")

</div>

Hi all,

I installed metricbeats on kubernetes as explained [here](https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html) and get now a nice dashboard of the kubernetes status.  
In kubernetes i use [liveness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) to see if a pod is down.  
Now i want to get alerted if liveness probes don't have success and the deployment of my microservice has problems.  
How can i get alerted that there is a problem with the liveness of my pods.  
If not what can be he alternative? I want to get alerted when my pods have problems. I am sure that metricbeats has all the data i need.

Thanks,

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [March 28, 2018, 9:38am UTC](https://discuss.elastic.co/t/how-to-setup-an-alert-for-a-failing-livesness-probe-in-kubernetes/125755/2 "2018-03-28T09:38:42Z")

</div>

Hi @David_Michael_Gang,

You have this information in the following fields:  
`kubernetes.pod.status.phase` and `kubernetes.pod.status.ready`, reported by `state_pod` metricset. If you have configured Metricbeat using our manifests along with `kube-state-metrics` it should be already working.

Phase and stauts are explained here:

> **[Pod Lifecycle](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/)**
>
> Production-Grade Container Orchestration

In general you are probably looking to alert when `kubernetes.pod.status.phase` is `pending` or `failed`.

You can define alerts with Watcher, have a look to [https://www.elastic.co/guide/en/x-pack/current/watcher-getting-started.html](https://www.elastic.co/guide/en/x-pack/current/watcher-getting-started.html) to deploy it, and [https://www.elastic.co/guide/en/kibana/current/watcher-getting-started.html](https://www.elastic.co/guide/en/kibana/current/watcher-getting-started.html) for a nice UI to configure  
alerts.

Best regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 25, 2018, 9:46am UTC](https://discuss.elastic.co/t/how-to-setup-an-alert-for-a-failing-livesness-probe-in-kubernetes/125755/3 "2018-04-25T09:46:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
