Why does DEA reset 'running_apps' attribute of VCAP::Component.varz before start monitoring apps ?

49 views
Skip to first unread message

Tatsuya Sato

unread,
Aug 31, 2012, 3:43:57 AM8/31/12
to vcap...@cloudfoundry.org
Why does DEA reset 'running_apps' attribute of VCAP::Component.varz before start monitoring apps ?

I'm developing a tool to monitor all components of cloud foundry and applications. 
this tool utilies the responses of varz with http. especially, 'running_apps' attributes of the response of DEA is used to monitor application instances but this attribute sometimes is empty. 
This is because DEA reset 'running_apps' attribute before start monitoring apps: https://github.com/cloudfoundry/dea/blob/master/lib/dea/agent.rb#L1525

This attribute is being empty array until monitoring apps will have been finished. in this time, my tools can not get information of application instances. 

Is this reset needed? seemingly, no components refer to this attribute. 

Thanks in advance. 


Lei Zhang

unread,
Aug 31, 2012, 4:30:43 AM8/31/12
to vcap...@cloudfoundry.org
1. The varz needed to be reset because it is so easily out-dated.

2. If you want to do monitor of DEA I have suggestions for you:

Firstly, monitor should be done in a Initiative way. that means your DEA update its stats to varz periodicly. And you get stats by requesting ../varz
Secondly, VCAP::Component has start up a Thin server for you to get varz more easilly(if you have noticed in vcap/component). 
What's more, the port, user, password of that Thin server is configurable like this in DEA.yml

status:  

port: 2222 
user: user
password: pw

So just send HTTP request to ip_of_dea:port/varz with auth = {user, pw}, you will get everything you need.

That has been proved to be works well by my partner, as DEA is responsible for updating the /varz instead of fetching it by yourself.

Toriq Pria Digfora

unread,
Aug 31, 2012, 5:52:19 AM8/31/12
to vcap...@cloudfoundry.org
How do you setup CF ? from apt-get method or Charm?
--
Thanks,
Toriq Pria Dhigfora
Meruvian System Integrator
High Performance Computing / Cloud Computing (HPC/CC)

Blog : http://blogs.mervpolis.com/roller/toriq354
Profil : http://facebook.com/toriq354
FB: http://www.facebook.com/meruvian
TW: http://www.twitter.com/meruvian  
Website: http://www.meruvian.org

res...@gmail.com

unread,
Aug 31, 2012, 7:25:27 AM8/31/12
to vcap...@cloudfoundry.org
By using chef of course.

Toriq Pria Digfora

unread,
Aug 31, 2012, 9:41:52 AM8/31/12
to vcap...@cloudfoundry.org
did u follow steps on http://blog.xtremeghost.com/2011/09/from-zero-to-drawbridge-via-ubuntu.html to setup it?
why do you prefer charm better than other methode?
what is the profit ?

:) 

Lei Zhang

unread,
Aug 31, 2012, 10:23:00 PM8/31/12
to vcap...@cloudfoundry.org
That's because I installed CF from source code, which needs arragement of compiling, bundle install, creating directories and  configuration files. That's what chef good at.

yss...@speedland.net

unread,
Sep 3, 2012, 10:56:05 AM9/3/12
to vcap...@cloudfoundry.org
> That has been proved to be works well by my partner, as  DEA is responsible for updating the /varz instead of fetching it by yourself.

yes, but during DEA is updating :running_apps of varz, which returns an empty array so that the client which requests /varz can't know whether there are really no apps on DEA.

Should it have state management of varz or just leave :running_apps as is even though it is out-dated (removing the line which Tatsuya mentioned)?

2012年8月31日金曜日 17時30分44秒 UTC+9 Lei Zhang:
Reply all
Reply to author
Forward
0 new messages