# Output after a health check for destination?

**URL:** <https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445>\
**Category:** Logstash\
**Created:** [August 6, 2024, 8:24am UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445 "2024-08-06T08:24:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Big-Edd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/big-edd/32/131503_2.png) [@Big-Edd](https://discuss.elastic.co/u/Big-Edd)\
**Post date:** [August 6, 2024, 8:24am UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445/1 "2024-08-06T08:24:20Z")

</div>

Hello Everyone,

When the output destination container is slower to start or unavailable, the message dequeued from RabbitMQ input is lost by Logstash.

Is it possible to have the Logstash wait for a health check to be OK, before attempting output?

Cheers,  
Eddie.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 6, 2024, 12:59pm UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445/2 "2024-08-06T12:59:37Z")

</div>

What output are you using? Are you using persistent queues? Please provide more detail.

---

<div class="post-metadata">

**Author:** ![Big-Edd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/big-edd/32/131503_2.png) [@Big-Edd](https://discuss.elastic.co/u/Big-Edd)\
**Post date:** [August 6, 2024, 1:51pm UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445/3 "2024-08-06T13:51:11Z")

</div>

Output is OpenSearch.

Re persistence:  
Are you asking about the RabbitMQ queues? They are durable.  
Or are you asking if the messages in the queue are published as persistent?  
They are not.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 6, 2024, 2:06pm UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445/5 "2024-08-06T14:06:34Z")

</div>

I am asking if you are using [persistent queues](https://www.elastic.co/guide/en/logstash/current/persistent-queues.html) in logstash. It is unclear under what circumstances you think logstash is losing messages. The at-least-once delivery model, along with persistent queues, should prevent message loss under most circumstances.

---

<div class="post-metadata">

**Author:** ![Big-Edd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/big-edd/32/131503_2.png) [@Big-Edd](https://discuss.elastic.co/u/Big-Edd)\
**Post date:** [August 7, 2024, 5:35am UTC](https://discuss.elastic.co/t/output-after-a-health-check-for-destination/364445/6 "2024-08-07T05:35:53Z")

</div>

No we are not using persistent queues in Logstash.

My apologies. I had the wrong impression of what was happening with our set up.

When OpenSearch was down, I saw the Logstash "in" event incrementing while "filtered" and "out" did not.

EG:

```auto
/_node/stats/events

```

```auto
{
  .. ..  
  },
  "events": {
    "in": 1,
    "filtered": 0,
    "out": 0,
    .. ..  
  }
}

```

But what I did not realize was this did increment when OpenSearch was available again.

Some more thorough testing has shown that the messages are getting through.

Sorry about that.

Thanks very much for your help.

Cheers,  
Eddie.
