[Openstack] Clarification on Ceilometer Implementation

2012-06-06 Thread Kobagana Kumar
Hi all,

I am trying to implement Agent module in Ceilometer. Regarding that I
have few doubts:

How Ceilometer capturing the usage details?

As we are already know nova simple usage module captures the usage
details of nova. It works at API level. But here in ceilometer we are
trying to implement Agent module at compute level. For that how can we
capture the usage details?


What is the format of Plug- In?

We can implement plug-in in various ways. We can use dictionary format,
JSON format, etc. In which format Ceilometer implementing the plug - in
and what are the attributes in that.


Thanks  Regards,
Bharath Kumar

DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] Clarification on Ceilometer Implementation

2012-06-06 Thread Doug Hellmann
On Wed, Jun 6, 2012 at 5:33 AM, Kobagana Kumar 
kobagana_ku...@persistent.co.in wrote:

  Hi all,

 ** **

 I am trying to implement Agent module in Ceilometer. Regarding that I 

 have few doubts:

 ** **

 How Ceilometer capturing the usage details?

 ** **

 As we are already know nova simple usage module captures the usage 

 details of nova. It works at API level. But here in ceilometer we are 

 trying to implement Agent module at compute level. For that how can we ***
 *

 capture the usage details?


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.

You don't say what your plugin is going to measure, so I can't be much more
specific than that.


 

 ** **

 ** **

 What is the format of Plug- In?

 ** **

 We can implement plug–in in various ways. We can use dictionary format,***
 *

 JSON format, etc. In which format Ceilometer implementing the plug – in **
 **

 and what are the attributes in that.


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:

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.

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.

Let me know if that information raises more specific questions about how to
implement a plugin.

Doug
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp