On 08/23/2016 09:37 PM, Benjamin Mahler wrote: > +jie > > Hi Olivier, > > Could you tell us what you're trying to do at a high level? > > I'm not familiar with cAdvisor, are you trying to generate a link to the > cAdvisor page for a particular container? on the web interface of my app, I propose to show real time cpu/mem usage of the job. To do so, I indeed "link" to the cadvisor job page. cAdvisor API is a URL with the container id. So I need to know the container id.
I can send a request to the slave to get it, but this not really efficient, it would be best to get the container id in TaskStatus message. In mesos.proto there is a ContainerStatus in the TaskStatus, but it also sends network/cgroup related info, not the container id, it would be nice to get it here. When we use the Docker containerizer, we have the container id info in the TaskStatus data parameter. Olivier > > Ben > > On Tue, Aug 23, 2016 at 7:53 AM, Olivier Sallou <[email protected]> > wrote: > >> >> On 08/23/2016 04:12 PM, haosdent wrote: >>> Hi, @Olivier You could get the containerId from the state endpoint of >> Mesos >>> Agent. http://mesos.apache.org/documentation/latest/ >> endpoints/slave/state/ >> Yes, I saw that, but I expected to get it from the TaskStatus message on >> RUNNING state change. >> >> With the Docker containerizer, we could get the container id in the data >> parameter. >> >> Triggering the slave on each task to get its container id is a little >> tricky and "expensive". >> >> Olivier >>> On Tue, Aug 23, 2016 at 3:50 PM, Olivier Sallou <[email protected] >>> >>> wrote: >>> >>>> One more question though. Using cgroups isolation, I can see mesos >>>> container in cAdvisor under, for example: >>>> >>>> /mesos/966e0b09-f38e-497c-afb8-0133d8fb48b1 >>>> >>>> >>>> but where can I get the container Id >>>> 966e0b09-f38e-497c-afb8-0133d8fb48b1 from TaskStatus ? >>>> >>>> >>>> I can see in Mesos UI the job details for a URL like: >>>> >>>> >>>> var / lib / mesos / slaves / b1925e13-76db-4225-a3dc-39ce65c79b3c-S0 / >>>> frameworks / b1925e13-76db-4225-a3dc-39ce65c79b3c-0000 / executors / >>>> 274 / runs / 966e0b09-f38e-497c-afb8-0133d8fb48b1 >>>> >>>> >>>> I can know/find all parameters but this last one. >>>> >>>> >>>> Thanks >>>> >>>> >>>> Olivier >>>> >>>> >>>> On 08/23/2016 09:30 AM, Olivier Sallou wrote: >>>>> ok, >>>>> >>>>> activating isolation with cgroups ni slave config activates detailled >>>> stats. >>>>> On 08/23/2016 09:23 AM, Olivier Sallou wrote: >>>>>> Hi, >>>>>> >>>>>> when switching to docker containerizer to unified containerizer, I >> lost >>>>>> the capacity to monitor task metrics (used cpu, used mem, ...) from >>>>>> cAdvisor. >>>>>> >>>>>> I tried to get stats from /monitor/statistics.json but I do not have >> any >>>>>> "live" metrics: >>>>>> >>>>>> [{"executor_id":"271","executor_name":"Command Executor (Task: 271) >>>>>> (Command: sh -c >>>>>> '\/mnt\/go-dock...')","framework_id":"b1925e13-76db- >>>> 4225-a3dc-39ce65c79b3c-0000","source":"271","statistics":{" >>>> cpus_limit":1.1,"mem_limit_bytes":2130706432,"timestamp": >>>> 1471936602.26916}}] >>>>>> I only see reserved metrics. >>>>>> >>>>>> >>>>>> Is there any specific config to get "live" monitoring. >>>>>> >>>>>> >>>>>> Thanks >>>>>> >>>>>> Olivier >>>>>> >>>> -- >>>> >>>> gpg key id: 4096R/326D8438 (keyring.debian.org) >>>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438 >>>> >>>> >> -- >> Olivier Sallou >> IRISA / University of Rennes 1 >> Campus de Beaulieu, 35000 RENNES - FRANCE >> Tel: 02.99.84.71.95 >> >> gpg key id: 4096R/326D8438 (keyring.debian.org) >> Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438 >> >> -- Olivier Sallou IRISA / University of Rennes 1 Campus de Beaulieu, 35000 RENNES - FRANCE Tel: 02.99.84.71.95 gpg key id: 4096R/326D8438 (keyring.debian.org) Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
