# Can heartbeat monitor ip/website via specific network interface?

**URL:** https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346
**Category:** Beats
**Tags:** heartbeat
**Created:** [June 16, 2022, 6:37am UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346 "2022-06-16T06:37:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![luckyclue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luckyclue/32/107101_2.png) [@luckyclue](https://discuss.elastic.co/u/luckyclue)
#### Post date: [June 16, 2022, 6:37am UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346/1 "2022-06-16T06:37:06Z")

</div>

One server connected to 3 ISP and need to monitor those latency to some ip/websites .

Can heartbeat monitor ip/website via specific network interface ? or run some scripts (for change gateway ) after complete a round of monitoring .

---

<div class="post-metadata">

### Author: ![kyungeunni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungeunni/32/125539_2.png) [@kyungeunni](https://discuss.elastic.co/u/kyungeunni)
#### Post date: [June 16, 2022, 3:55pm UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346/2 "2022-06-16T15:55:17Z")

</div>

Hi @luckyclue,  
Currently, there's no option available to specify the origin interface of a monitor. [This](https://github.com/elastic/beats/blob/1f4b1460a196eac74d1929b13e830b6bd6f101e6/heartbeat/monitors/active/dialchain/dialers.go#L100) is where we create a tcp connection for http monitors and since we are not specifying any local address, it is being resolved for us. Do you think this [topic](https://superuser.com/questions/241178/how-to-use-different-network-interfaces-for-different-processes/750412#750412) can be a possible workaround for your use case?

This is a great idea for a feature. we've opened an issue for it, but it's not a top priority since it's a very rare request. We'd gladly accept a contribution / PR however.

Thanks,  
Kyungeun

---

<div class="post-metadata">

### Author: ![luckyclue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luckyclue/32/107101_2.png) [@luckyclue](https://discuss.elastic.co/u/luckyclue)
#### Post date: [June 16, 2022, 4:40pm UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346/3 "2022-06-16T16:40:09Z")

</div>

netns ! I almost forget it . I think it's worth trying . Thx

---

<div class="post-metadata">

### Author: ![kyungeunni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungeunni/32/125539_2.png) [@kyungeunni](https://discuss.elastic.co/u/kyungeunni)
#### Post date: [June 20, 2022, 9:30am UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346/4 "2022-06-20T09:30:26Z")

</div>

Thanks!! FYI I've created a [ticket](https://github.com/elastic/beats/issues/31971) in our beats repository if you'd like to track updates on this 🙂

---

<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: [July 18, 2022, 11:30am UTC](https://discuss.elastic.co/t/can-heartbeat-monitor-ip-website-via-specific-network-interface/307346/5 "2022-07-18T11:30:47Z")

</div>

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