Rancher GitLab Shared Monitoring/Logging

GitLab and rancher both support monitoring using Prometheus and logging using elasticsearch. Both use a very similar setup. However GitLab and rancher expect the applications to live in different namespaces, so it’s impossible for both systems to share the same Prometheus and elasticsearch, which seems extremely redundant.

As far as I can tell the main issue is that GitLab and rancher are too opinionated about the namespaces they deploy the software. Does anyone have any idea on how to get the systems to play nice together and share the same Prometheus and elasticsearch?

I have attached the GitLab and rancher details below for those systems.

For a similar use case, I added a NGINX in reverse proxy pointing to the prometheus:

    events {
    }
    http {
      server {
        listen 80;
        location / {
          proxy_pass http://prometheus-server.monitoring.svc.cluster.local:80;
       }
     }
    }

1 Like

But I hope project like Gitlab and Rancher will evolve, letting us decide which namespace/service-name should be used.

2 Likes

We have the exact same problem as OP and are trying to implement your workaround. Do I understand you correct, that you kept using the Rancher namespace for Prometheus and just only deployed the nginx reverse proxy in the gitlab-managed-apps namespace?

That seems to easy to work to be honest :sweat_smile:

Thank you in advance :slight_smile:

Yes, you perfectly understood what I did. And it worked.

1 Like

But did you deploy a new nginx deployment or just an nginx ingress ressource from your default ingress controller with the reverse proxy configs?

Yes, this is a new nginx instance, deployed as a single app, serving only as a reverse proxy for the prometheus. It is exposed via a dedicated Ingess.