# Multiple masters for one agent - possible?

**URL:** <https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402>\
**Category:** Icinga 2\
**Created:** [February 2, 2023, 1:16pm UTC](https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402 "2023-02-02T13:16:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![im\_it](https://community.icinga.com/letter_avatar_proxy/v4/letter/i/e99b99/32.png) [@im\_it](https://community.icinga.com/u/im_it)\
**Post date:** [February 2, 2023, 1:16pm UTC](https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402/1 "2023-02-02T13:16:57Z")

</div>

Hi folks,  
we monitor all of our servers with one icinga2-master. Now our service-provider wants to monitor two of the servers too - with icinga2… and that´s my problem. Is it possible permitting 2 masters to monitor one slave?  
Or can I use e.g. 2 Icinga2-agent instances on the slave, using different ports?  
Any other Idea? Thanks a lot in advance…

---

<div class="post-metadata">

**Author:** ![rivad](https://community.icinga.com/user_avatar/community.icinga.com/rivad/32/5852_2.png) [@rivad](https://community.icinga.com/u/rivad)\
**Post date:** [February 2, 2023, 1:52pm UTC](https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402/2 "2023-02-02T13:52:41Z")

</div>

Welcome to the forum.

You will need a separate agent on a different port.  
Alternatively you could grant them access to the objects in question via API or they duplicate your objects and grand you API access to update the status and messages.

We do this to mirror information from one Icinga2 install to an other.

---

<div class="post-metadata">

**Author:** ![im\_it](https://community.icinga.com/letter_avatar_proxy/v4/letter/i/e99b99/32.png) [@im\_it](https://community.icinga.com/u/im_it)\
**Post date:** [February 9, 2023, 3:08pm UTC](https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402/3 "2023-02-09T15:08:36Z")

</div>

Thanks a lot for your answer! API sounds like tricky for me, so a separate agent with a different port may be helpful I think. I will try it and post the result here.

---

<div class="post-metadata">

**Author:** ![im\_it](https://community.icinga.com/letter_avatar_proxy/v4/letter/i/e99b99/32.png) [@im\_it](https://community.icinga.com/u/im_it)\
**Post date:** [March 23, 2023, 4:48pm UTC](https://community.icinga.com/t/multiple-masters-for-one-agent-possible/11402/4 "2023-03-23T16:48:02Z")

</div>

Ok, I’ve done it - and it works.

Multiple ports doesn#t work for me, because the server-api may only listen to one port. But I installed 2 different icinga2-services at the server and use different paths for configuration- and work-dir.  
This helps: [Windows client: Running multiple instances per node · Issue #5084 · Icinga/icinga2 · GitHub](https://github.com/Icinga/icinga2/issues/5084)  
I used local firewall rules for communication between the various icinga servers and their corresponding services on the server.
