Ns8-crowdsec: URL in admin report e-mail does not work

I have found two issues in the crowdsec admin notification e-mail:

  1. When you enable the admin emails on crowdsec for non-master nodes the link in the e-mail links named View active decisions links to the local node cluster-admin page but instead it should link to master node.
  2. Second issue is that it refers to a unban page (?page=unban) which does not seem to exist.

The link is generated in the template at ns8-crowdsec/imageroot/templates/email.yaml at main · NethServer/ns8-crowdsec · GitHub

It seems it is (re)generated here:

Is there a ns8 approved way of getting the FQDN of the cluster master host? If so I can perhaps submit a PR to address:

it should fix the issue

Although I like the rapid turnaround on the fix wouldn’t it be better to expose this the the agent module? So, the determination gets one unique definition in code accessible to the whole nethserver eco system?

It seems there already is a way to request smarthost, wouldn’t it be nice to also be able to receive the details of the master node as an exposed python method?