# Trying to add readiness and liveness to filebeat

**URL:** https://discuss.elastic.co/t/trying-to-add-readiness-and-liveness-to-filebeat/296785
**Category:** Beats
**Tags:** filebeat
**Created:** [February 9, 2022, 9:01pm UTC](https://discuss.elastic.co/t/trying-to-add-readiness-and-liveness-to-filebeat/296785 "2022-02-09T21:01:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anu2](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anu2](https://discuss.elastic.co/u/anu2)
#### Post date: [February 9, 2022, 9:01pm UTC](https://discuss.elastic.co/t/trying-to-add-readiness-and-liveness-to-filebeat/296785/1 "2022-02-09T21:01:29Z")

</div>

k8s version-v1.19.16  
filebeat version 7.7.1

i am trying to add readiness and liveness to my code.

livenessProbe:

```
        exec:

          command:

          - sh

          - -c

          - |

            #!/usr/bin/env bash -e

            curl --fail 127.0.0.1:5044

        failureThreshold: 3

        initialDelaySeconds: 10

        periodSeconds: 10

        timeoutSeconds: 5

      readinessProbe:

        exec:

          command:

          - sh

          - -c

          - |

            #!/usr/bin/env bash -e

            filebeat test output

        failureThreshold: 3

        initialDelaySeconds: 10

        periodSeconds: 10

        timeoutSeconds: 5

```

when i restarted the pods i am getting port not found/reachable

i wanted to know which should be used

---

<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: [March 9, 2022, 11:02pm UTC](https://discuss.elastic.co/t/trying-to-add-readiness-and-liveness-to-filebeat/296785/2 "2022-03-09T23:02:26Z")

</div>

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