# Health check for remote Daml Canton Mediator

**URL:** <https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704>\
**Category:** App Development\
**Tags:** canton\
**Created:** [November 25, 2022, 4:18pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704 "2022-11-25T16:18:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [November 25, 2022, 4:18pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/1 "2022-11-25T16:18:08Z")

</div>

Hi everyone.  
Could you please advise? I need setup health check for mediators which are working HA mode. We have 3 remote mediators and we want to use for mediators Load Balancer and need know who is active and who is passive.  
For remote participants I know that we have next configs:

```haskell
        monitoring {
            health {
                server {
                    address = 0.0.0.0
                    port = 8000
                }
            check.type = is-active
            }
        }

```

Can we use something like this for remote mediators? Generally is it possible use remote mediators together with Load Balancer?  
Thanks.

---

<div class="post-metadata">

**Author:** ![soren](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/soren/32/51_2.png) [@soren](https://forum.canton.network/u/soren)\
**Post date:** [November 28, 2022, 1:15pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/2 "2022-11-28T13:15:31Z")

</div>

Hi Maksym,

Currently the `is-active` health check only works for participant nodes, but we opened an issue internally and are going to extend it to the other nodes as well.

Unlike participant nodes that provide the ledger API, the mediator does not offer an external API besides the admin API, therefore a load balancer would only be needed for the canton console.

However in that case, there’s a workaround where you can query the activeness of a mediator through it’s health status from the canton console, for example, `remoteMediator1.health.status.trySuccess.active` returns true when mediator1 is active. That way you can decide which mediator is active and where to send admin commands to without the need for an additional load balancer.

I hope this helps, let me know if you have further questions.

---

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [November 28, 2022, 1:38pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/3 "2022-11-28T13:38:53Z")

</div>

Yeah. Thanks for this info. I will try to do it as you mentioned. But where I can follow your updates about is-active health check for another nodes(mediator/sequencer)? Maybe some release notes or another place?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [November 28, 2022, 2:31pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/4 "2022-11-28T14:31:41Z")

</div>

@soren could you please advise if it is possible? How redirect result of script to standard stdout if run it using canton console:  
bin/canton run script -c config.conf  
Is it possible?  
Thanks.

---

<div class="post-metadata">

**Author:** ![soren](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/soren/32/51_2.png) [@soren](https://forum.canton.network/u/soren)\
**Post date:** [November 28, 2022, 4:51pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/5 "2022-11-28T16:51:59Z")

</div>

Yes it will be documented as part of the release notes.

For the script you can use `println` to write results to stdout.

---

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [November 28, 2022, 5:59pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/6 "2022-11-28T17:59:25Z")

</div>

@soren  
thanks for advise and help. So waiting new release.

---

<div class="post-metadata">

**Author:** ![soren](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/soren/32/51_2.png) [@soren](https://forum.canton.network/u/soren)\
**Post date:** [December 1, 2022, 3:31pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/7 "2022-12-01T15:31:30Z")

</div>

FYI the extension of the `is-active` health check to all nodes will be part of v2.5.0-rc1 that will come out in the next days.

---

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [December 1, 2022, 3:55pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/8 "2022-12-01T15:55:48Z")

</div>

@soren  
Ohh very nice. It is great news. Becuase I created some workaround for it but want to have standard functionality for it.

Waiting it.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Maksym\_Zhovanyk](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/maksym_zhovanyk/32/3249_2.png) [@Maksym\_Zhovanyk](https://forum.canton.network/u/Maksym_Zhovanyk)\
**Post date:** [January 10, 2023, 12:32pm UTC](https://forum.canton.network/t/health-check-for-remote-daml-canton-mediator/5704/9 "2023-01-10T12:32:41Z")

</div>

@soren  
I saw that we already have canton release version 2.5. But in release notes I dont see info about health-check for mediator. It was added? Could you please advise?  
Thanks.
