Health check for remote Daml Canton Mediator

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:

        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.

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.

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.

@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.

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

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

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

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.

@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.

@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.