Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus with Basic Auth #38

Open
benjaminguttmann-avtq opened this issue Oct 27, 2022 · 8 comments
Open

Prometheus with Basic Auth #38

benjaminguttmann-avtq opened this issue Oct 27, 2022 · 8 comments

Comments

@benjaminguttmann-avtq
Copy link

Currently Promlens does not support if Prometheus is protected via basic auth, would be great if that could be added.

@avdicl
Copy link

avdicl commented Dec 29, 2022

+1. Would love to see either Basic Auth working with PromLens or PromLens incorporated into the Prometheus Web UI as an additional option.

@Monpoke
Copy link

Monpoke commented Jan 3, 2023

Hey, same issue here!

I am hosting PromLens on Kubernetes and I used a workaround this way:

  • Promlens is hosted in same namespace than Prometheus
  • I declared two ingress ressources:
  1. One to Promlens service
  2. Another one, on same hostname, which is a proxy to prometheus service. This way, prometheus api is served on same hostname and on prefix: /prometheus
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/auth-url: http://nginx-ldap-auth.kube-system.svc.cluster.local:5555 # our basic-auth system
  name: promlens
  namespace: monitoring
spec:
  ingressClassName: ingress-private
  rules:
  - host: promlens.myfqdn
    http:
      paths:
      - backend:
          service:
            name: promlens
            port:
              number: 8080
        path: /
        pathType: Prefix
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/auth-url: http://nginx-ldap-auth.kube-system.svc.cluster.local:5555
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  name: promlens-to-prometheus
  namespace: monitoring
spec:
  ingressClassName: ingress-private
  rules:
  - host: promlens.myfqdn
    http:
      paths:
      - backend:
          service:
            name: prometheus-prometheus
            port:
              number: 9090
        path: /prometheus(/|$)(.*)
        pathType: Prefix

Thanks for this awesome tool! :)

@ypid-work
Copy link

I just found another nice workaround. Just use --grafana.url. Then Grafana will handle basic auth. PromLens even says this in the logs:

promlens_1  | 2023/01/31 18:27:46 Proxying to Grafana at /api/datasources/proxy/92/api/v1/query...

Cheers :)

@omerfsen
Copy link

I just found another nice workaround. Just use --grafana.url. Then Grafana will handle basic auth. PromLens even says this in the logs:

promlens_1  | 2023/01/31 18:27:46 Proxying to Grafana at /api/datasources/proxy/92/api/v1/query...

Cheers :)

I have a grafana behind TLS but SSL certificate is not valid. Is there a way to disable it ?

tls_skip_verify_insecure maybe ? but where.

@glidea
Copy link

glidea commented Jul 15, 2023

I added support for Basic Auth in this Fork (https://github.com/glidea/promlens), and a 'datasource' manager (https://github.com/glidea/promlens-datasource-manager)

@MrXiongyong
Copy link

I added support for Basic Auth in this Fork (https://github.com/glidea/promlens), and a 'datasource' manager (https://github.com/glidea/promlens-datasource-manager)

Is there a Docker image that can be used,thanks

@glidea
Copy link

glidea commented Oct 17, 2024

I added support for Basic Auth in this Fork (https://github.com/glidea/promlens), and a 'datasource' manager (https://github.com/glidea/promlens-datasource-manager)

Is there a Docker image that can be used,thanks

来兄弟。https://hub.docker.com/repository/docker/glidea/promlens/tags

@MrXiongyong
Copy link

谢谢兄弟,我试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants