How to change localhost to hostname in alerts?

Hello, how do you connect the Grafana to the grafana labs? do you have tutorial?