Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose containerPort as __meta label for marathon_sd_config #4310
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bforbis commentedJun 25, 2018
I would like to build out a
marathon_sd_configthat can scape a Marathon DC/OS cluster for all instances of a particular docker image that I have built and handed off as a tool to other users to deploy themselves within the cluster.The problem is that this docker image has more than one port, so there is not an easy deterministic way for me to find which port is the port it is serving metrics from. It seems that the recommended way is for users to set a
portDefinitionsorportMappingslabel in their marathon app definition and then prometheus should filter on these labels usingrelabel_configs, however that relies on the users deploying that docker image to follow a standard labeling convention. This means if a user doesn't follow this convention, my discovery will fail to work.On the other hand, if the app's container port was exposed as a __meta label (which I know is always set to 8080), I could just filter on that information.