How to customize Alert Manager incident email alert results_link and view_link URL (host:port)?

Path Finder

How do I get the Alert Manager incident emails links host:port part customised?

alert_manager/bin/lib/ seems to be using REST endpoint to get the server_info:

uri = '/services/server/info?output_mode=json'
context.update({ "results_link" : protocol + "://"+server_info["host_fqdn"] + ":"+ http_port +"/app/" + incident["app"] + "/@go?sid=" + incident["job_id"] })

context.update({ "view_link" : protocol + "://"+server_info["host_fqdn"] + ":" + http_port + "/app/" + incident["app"] + "/alert?s=" + urllib.quote("/servicesNS/nobody/"+incident["app"]+"/saved/searches/" + incident["alert"] ) })

I have a setup, where the host_fqdn is different than the SH public webui access URL.
I have already customized the generic server settings for Alert emails, which has a correct URL, so I could use it like this:

uri = '/services/configs/conf-alert_actions/email?output_mode=json'
context.update({ "results_link" : alert_email_settings["hostname"] +"/app/..."
Get Updates on the Splunk Community!

Observability Highlights | November 2022 Newsletter

 November 2022Observability CloudEnd Of Support Extension for SignalFx Smart AgentSplunk is extending the End ...

Avoid Certificate Expiry Issues in Splunk Enterprise with Certificate Assist

This blog post is part 2 of 4 of a series on Splunk Assist. Click the links below to see the other ...

Using Machine Learning for Hunting Security Threats

REGISTER NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more ...