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

alertmanager.url must be a public url (not just a container name) #1250

Closed
casertap opened this Issue Dec 1, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@casertap
Copy link

casertap commented Dec 1, 2015

Using prometheus with alertmanager to monitor containers is great.
The problem is that the alertmanager.url option in the command:

prometheus:
    image: prom/prometheus
    links:
        - cadvisor
        - promalertmgr
        - wpprog
        - wptrad
        - mysql
    ports:
        - "127.0.0.1:9090:9090"
    expose:
        - "9090"
    command: -config.file=/etc/prometheus/prometheus.yml -alertmanager.url=http://myhosturl:9093
    env_file:
        - './.env'
    volumes:
        - ./alert.rules:/etc/prometheus/alert.rules:ro
        - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro

needs to be the host url.
This is problematic because the port 9093 which also serve the dashboard needs to be public on the host machine.

This could be so much better if we could use the /etc/hosts created by docker to point to the alermanager container within the private network of docker.

this way the command will look like such:

command: "-config.file=/etc/prometheus/prometheus.yml -alertmanager.url=promalertmanager:9093"

Then the promalertmanager will be:

promalertmgr:
    image: prom/alertmanager
    ports:
        - "127.0.0.1:9093:9093"
    expose:
        - "9093"
    command: "-config.file=/alertmanager.conf"
    volumes:
        - ./alertmanager.conf:/alertmanager.conf:ro
    env_file:
        - './.env'

The important part here is that 9093 is expose only to 127.0.0.1.
This means nobody can see the dashboard of alertmanager from the outside.

I will need to create a ssh tunnel to see this dashboard and I will be very happy with that.

I have open some issues about that but did not get much answers:
prometheus/alertmanager#141
prometheus/alertmanager#164

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 29, 2016

Per prometheus/alertmanager#164 (comment) this appears to be an issue with your setup rather than anything innate with prometheus or alertmanager. If you've a specific feature you'd like us to implement please file an issue for it.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.