# IDO master - set prefered host

**URL:** <https://community.icinga.com/t/ido-master-set-prefered-host/5749>\
**Category:** Icinga 2\
**Tags:** ido\
**Created:** [October 9, 2020, 12:11pm UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749 "2020-10-09T12:11:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://community.icinga.com/user_avatar/community.icinga.com/marcuscaepio/32/287_2.png) [@MarcusCaepio](https://community.icinga.com/u/MarcusCaepio)\
**Post date:** [October 9, 2020, 12:11pm UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/1 "2020-10-09T12:11:28Z")

</div>

Hi all,  
my both master server have a local DB, where the DBs are in a mariaDB master-master replication.  
I want, that the IDO connection is built on my first master node and only on the second, if the first is down. Unfortunately (doesn’t matter, what I try) the IDO connection is always built up from the second master. Is there any way to set a prefered master for the IDO connection?

Cheers,  
Marcus

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [October 12, 2020, 10:27am UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/2 "2020-10-12T10:27:00Z")

</div>

Hello @MarcusCaepio!

Have you tried to rename the IdoMysqlConnection object in `/etc/icinga2/features-available/ido-mysql.conf` from `ido-mysql` to something else?

Attention: They shall be named equally on both masters.

Best,  
AK

---

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://community.icinga.com/user_avatar/community.icinga.com/marcuscaepio/32/287_2.png) [@MarcusCaepio](https://community.icinga.com/u/MarcusCaepio)\
**Post date:** [October 14, 2020, 8:19am UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/3 "2020-10-14T08:19:14Z")

</div>

How should renaming help to set a preferred server for the IDO conenction?

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [October 14, 2020, 9:29am UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/4 "2020-10-14T09:29:46Z")

</div>

> <https://github.com/Icinga/icinga2/blob/876fa8ba97a5c621b5e778649cc669f1611fdc3b/lib/remote/apilistener-authority.cpp#L71>

---

<div class="post-metadata">

**Author:** ![martin](https://community.icinga.com/user_avatar/community.icinga.com/martin/32/3229_2.png) [@martin](https://community.icinga.com/u/martin)\
**Post date:** [October 14, 2020, 9:56am UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/5 "2020-10-14T09:56:28Z")

</div>

Hello,

This topic might help. 🙂  
I created it before seeing this thread.

> [@Choose the preferred IDO active endpoint](https://community.icinga.com/t/choose-the-preferred-ido-active-endpoint/5786):
>
> Hello! This is to continue the previous archived topic: [https://monitoring-portal.org/t/icinga2-master-ha-active-endpoint/701](https://monitoring-portal.org/t/icinga2-master-ha-active-endpoint/701) I had the same problem: I wanted to decide which of the 2 masters is the “preferred IDO master”. This is for optimization purposes. My DB cluster is located in Northern Europe. I have 2 Icinga masters: one in Eastern Europe, and one next to Northern Europe. When both masters are UP, it was sad to see the Eastern Europe master was automatically chosen as the IDO mas…

---

<div class="post-metadata">

**Author:** ![MarcusCaepio](https://community.icinga.com/user_avatar/community.icinga.com/marcuscaepio/32/287_2.png) [@MarcusCaepio](https://community.icinga.com/u/MarcusCaepio)\
**Post date:** [October 14, 2020, 10:08am UTC](https://community.icinga.com/t/ido-master-set-prefered-host/5749/6 "2020-10-14T10:08:17Z")

</div>

Well ok, the order was correct, but indeed, changing the name of the ido connection did the trick… never thought about this, thanks all
