You need to create service/router for metrics. I recently gave an example here: Prometheus Authentication in File