Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

password protect prometheus access

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?

like image 493
Lars Erik Fagernaes Avatar asked Sep 05 '15 13:09

Lars Erik Fagernaes


People also ask

Is it safe to expose Prometheus?

Don't expose your data. By default, your Prometheus server can allow anyone to make queries to get information from your Kubernetes Cluster. This is not something new.

Is Prometheus encrypted?

By default, Amazon Managed Service for Prometheus automatically provides you with encryption at rest and does this using AWS owned keys.

Can Prometheus monitor itself?

Prometheus will measure time automatically and expose the metrics. It's a good idea to add a label for a topic.

What can be monitored with Prometheus?

Prometheus is an open-source technology designed to provide monitoring and alerting functionality for cloud-native environments, including Kubernetes. It can collect and store metrics as time-series data, recording information with a timestamp. It can also collect and record labels, which are optional key-value pairs.


1 Answers

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.

like image 104
brian-brazil Avatar answered Sep 28 '22 19:09

brian-brazil