Hi there, I’m trying to figure out what would the best way to learn the agent id without having to read the complete state of mesos. Currently, I do the following:
mesos-state 2>/dev/null | jq '.slaves[] | select(.hostname == "’$(AGENT_HOSTNAME)'") | .id' -r However, depending on how much stuff is happening, the amount of data thrown away is less massive or even more massive. I am currently looking at 2 options, I only want to learn the agent id on a host running that agent: cat $MESOS_WORKPLACE/meta/slaves/latest/slave.info but I’m not sure what format the data in this file is in? It looks encoded but not sure what the exact encoding is. The other option I’m looking at is: basename $(readlink -f $(find $MESOS_WORKPLACE/meta/slaves -maxdepth 1 -type l)) But I’m not sure if there are any caveats I should be aware of? Any pointers? Kind regards, Radek Gruchalski [email protected] (mailto:[email protected]) (mailto:[email protected]) de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/) Confidentiality: This communication is intended for the above-named person and may be confidential and/or legally privileged. If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.

