Grafana integration elastic monitoring with alloy

i m trying to use grafana connection (integration) to monitor elastic instance, i cant get it to work with my instance unless i desactivate https and authetication, can you help me configure the alloy snippet to access metrics of my elastic instance