<br><br><div class="gmail_quote">On Wed, Jun 6, 2012 at 5:33 AM, Kobagana Kumar <span dir="ltr"><<a href="mailto:kobagana_kumar@persistent.co.in" target="_blank">kobagana_kumar@persistent.co.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to implement Agent module in Ceilometer. Regarding that I
<u></u><u></u></p>
<p class="MsoNormal">have few doubts:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">How Ceilometer capturing the usage details?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">As we are already know "nova simple usage" module captures the usage
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">details of nova. It works at API level. But here in ceilometer we are
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">trying to implement Agent module at compute level. For that how can we
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">capture the usage details?</span></p></div></div></blockquote><div><br></div><div>Most of the ceilometer agents are going to run at a low level and talk directly to the hypervisor or network manager. For example, the pollsters that Julien wrote use libvirt to get the CPU utilization and disk I/O for a VM.</div>
<div><br></div><div>You don't say what your plugin is going to measure, so I can't be much more specific than that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">What is the format of Plug- In?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">We can implement plug–in in various ways. We can use dictionary format,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">JSON format, etc. In which format Ceilometer implementing the plug – in
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">and what are the attributes in that.</span></p></div></div></blockquote><div><br></div><div>We need to write some developer documentation, but we only finished the first implementation very recently. Until we have better docs, your best source of information is going to be (unfortunately) the source for the existing pollsters (in the ceilometer.compute package, look at libvirt.py and network.py). I will try to summarize what you need to be looking for:</div>
<div><br></div><div>An agent plugin (a.k.a., "pollster") is a Python class derived from ceilometer.plugin.PollsterBase. You need to implement the get_counters() method in your class. It should return an iterable containing ceilometer.counter.Counter instances filled in with the appropriate data. The code that calls the plugin will format the data from the Counter as a message and publish it, so your plugin doesn't have to worry about that at all.</div>
<div><br></div><div>To register the plugin with the agent, create a setuptools entrypoint using the ceilometer.poll.compute namespace (see the setup.py for ceilometer for some examples). If we create a ceilometer agent process that needs to run on non-compute nodes, we will create another namespace for the pollster plugins.</div>
<div><br></div><div>Let me know if that information raises more specific questions about how to implement a plugin.</div><div><br></div><div>Doug</div><div><br></div></div>