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

Marathon_SD Host Target Address when using Virtual Networks #5067

Open
Smithx10 opened this Issue Jan 5, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@Smithx10
Copy link

Smithx10 commented Jan 5, 2019

Proposal

While using the Marathon_SD configuration with a prometheus server external to Mesosphere Cluster ( which uses marathon ) I ran into a situation where the Port's Target Address would use the Virtual IP instead of the HOST IP, which is fair if the Prometheus Server was internal to the DC/OS cluster.

I added an external option to the config which will bias the ports Target Address to the Host IP which is routable externally. If omitted, marathon_sd behaves the same as before. So this should be a non breaking change.

Smithx10@2780ee5

In IRC someone suggested relabelling, but I don't believe there is any meta labels that would facilitate this behaviour.

__meta_marathon_app: the name of the app (with slashes replaced by dashes)
__meta_marathon_image: the name of the Docker image used (if available)
__meta_marathon_task: the ID of the Mesos task
__meta_marathon_app_label_<labelname>: any Marathon labels attached to the app
__meta_marathon_port_definition_label_<labelname>: the port definition labels
__meta_marathon_port_mapping_label_<labelname>: the port mapping labels
__meta_marathon_port_index: the port index number (e.g. 1 for PORT1)

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#marathon_sd_config

@Smithx10

This comment has been minimized.

Copy link
Author

Smithx10 commented Jan 7, 2019

After receiving feedback from @brian-brazil in #5068 I have added the meta_marathon_host label to the marathon_sd configuration.

This should be addressed in https://github.com/Smithx10/prometheus/tree/marathon_sd_host_md

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