'password protect prometheus access [closed]

I am using prometheus to graph stats on my server. The problem is that that annybody can access the graphs from http://my.Ip.Adress:port/index.html. How can i password protect this access? alternatively: possible to password protect the port?



Solution 1:[1]

Prometheus doesn't have any built-in authentication or authorisation (there's just too many possible configurations), however you can use a reverse proxy to achieve this.

http://www.robustperception.io/adding-basic-auth-to-prometheus-with-nginx/ describes one way to do it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 brian-brazil