# How to use healthy upstream targets from Health Checks event in a custom plugin?

**URL:** <https://discuss.konghq.com/t/how-to-use-healthy-upstream-targets-from-health-checks-event-in-a-custom-plugin/8690>\
**Category:** Questions\
**Created:** [July 12, 2021, 7:39pm UTC](https://discuss.konghq.com/t/how-to-use-healthy-upstream-targets-from-health-checks-event-in-a-custom-plugin/8690 "2021-07-12T19:39:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rezwanul-Haque](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rezwanul-haque/32/2843_2.png) [@Rezwanul-Haque](https://discuss.konghq.com/u/Rezwanul-Haque)\
**Post date:** [July 12, 2021, 7:39pm UTC](https://discuss.konghq.com/t/how-to-use-healthy-upstream-targets-from-health-checks-event-in-a-custom-plugin/8690/1 "2021-07-12T19:39:08Z")

</div>

I’m new to kong. So this question might be silly.

Kong: 2.4.0  
OS: ubuntu 18.04

I’m using DB-less mode of kong. I’ve configured the active & passive health check on upstream target which is an SRV record. SRV record health checks are working fine but I need one of the SRV records resolved healthy targets in my custom plugin to manually trigger an HTTP request to my service.

In the logs, I’m constantly seeing My targets are healthy. So In my custom plugin, is there any way I can use the healthy targets to call an HTTP request ignoring unhealthy targets.

So far I have tried to investigate the global Kong object values, Ngx object values if those healthy targets are there for use but I couldn’t find anything in those two objects so far.

If Anyone knows anything about this, please help.

Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![flowdopip](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/flowdopip/32/1704_2.png) [@flowdopip](https://discuss.konghq.com/u/flowdopip)\
**Post date:** [March 23, 2022, 10:46pm UTC](https://discuss.konghq.com/t/how-to-use-healthy-upstream-targets-from-health-checks-event-in-a-custom-plugin/8690/2 "2022-03-23T22:46:30Z")

</div>

can you please share your db-less config?
