Dockerized Prometheus and Nginx

363 views
Skip to first unread message

devino...@gmail.com

unread,
Aug 2, 2017, 4:33:04 PM8/2/17
to Prometheus Developers
I have a Debian VM with a docker image of Prometheus and a docker image of Nginx running side by side. I'm using Nginx for the proxy aspect to run Prometheus over SSL. I can get the root domain url to return a Nginx placeholder index page, but I cannot for the life of me get the domain to forward port 9090 to the docker container hosting Prometheus.

The Prometheus container is using network of Nginx container and port 9090 is exposed in Nginx container.

For my Nginx config I have the following. I've tried many different config setups but this is the latest. I'm afraid I've been working on this too long and probably overlooking something obvious. I'm also more used to Apache so I'm not totally comfortable with Nginx yet.

http {
upstream prometheus {
server 127.0.0.1:9090;
}

server {
listen 9090;
server_name example-domain.com;
ssl_certificate /etc/nginx/certificate.pem;
ssl_certificate_key /etc/nginx/key.pem;

location / {
proxy_pass http://prometheus;
}
}
}
events {

Anyone else been able to run Prometheus and Nginx in separate docker containers on same machine over HTTPS?

Julius Volz

unread,
Aug 2, 2017, 5:10:11 PM8/2/17
to devino...@gmail.com, Prometheus Developers
Hi,

The prometheus-users@googlegroups.com list would be the right place to ask usage questions like this, as we're trying to keep prometheus-developers@ focussed on discussions around developing Prometheus itself.


Cheers,
Julius


--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/85fef5aa-825d-4484-9539-03c0ea1038f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

devino...@gmail.com

unread,
Aug 2, 2017, 5:18:20 PM8/2/17
to Prometheus Developers, devino...@gmail.com
Heard. Have reposted there: https://groups.google.com/forum/#!topic/prometheus-users/vv4Gi9rc99c

Thanks

On Wednesday, August 2, 2017 at 5:10:11 PM UTC-4, Julius Volz wrote:
> Hi,
>
>
>
> The promethe...@googlegroups.com list would be the right place to ask usage questions like this, as we're trying to keep prometheus-developers@ focussed on discussions around developing Prometheus itself.
>
>
> See also https://prometheus.io/community/
>
>
> Cheers,
> Julius
>
>
>
> On Wed, Aug 2, 2017 at 10:33 PM, <devino...@gmail.com> wrote:
> I have a Debian VM with a docker image of Prometheus and a docker image of Nginx running side by side. I'm using Nginx for the proxy aspect to run Prometheus over SSL. I can get the root domain url to return a Nginx placeholder index page, but I cannot for the life of me get the domain to forward port 9090 to the docker container hosting Prometheus.
>
>
>
> The Prometheus container is using network of Nginx container and port 9090 is exposed in Nginx container.
>
>
>
> For my Nginx config I have the following. I've tried many different config setups but this is the latest. I'm afraid I've been working on this too long and probably overlooking something obvious. I'm also more used to Apache so I'm not totally comfortable with Nginx yet.
>
>
>
> http {
>
>         upstream prometheus {
>
>             server 127.0.0.1:9090;
>
>         }
>
>
>
>         server {
>
>                 listen 9090;
>
>                 server_name             example-domain.com;
>
>                 ssl_certificate         /etc/nginx/certificate.pem;
>
>                 ssl_certificate_key /etc/nginx/key.pem;
>
>
>
>                 location / {
>
>                     proxy_pass         http://prometheus;
>
>                 }
>
>         }
>
> }
>
> events {
>
>
>
> Anyone else been able to run Prometheus and Nginx in separate docker containers on same machine over HTTPS?
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
>
> To post to this group, send email to prometheus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages