Plugins enable/disable with multiple agent-central instances

Asked by visharma on 2013-03-28

Hi,

I am using the grizzly-2 release of ceilometer.

I earlier asked about how to enable agent-central plugins (https://answers.launchpad.net/ceilometer/+question/221769)

It was clear that it can be done by modifying the entry_points.txt file.

In our set-up we have multiple agent-centrals / rabbit-servers/ collectors
agent-central-instance-A --> rabbit-server-A ---> collector-instance-A ----> mongo-X
agent-central-instance-B --> rabbit-server-B ---> collector-instance-B ----> mongo-X

Here agent-A, agent-B run on the same machine, but communicate to rabbits, both present on different machines. agent-A and agent-B are different services making use of the same executable ceilometer-agent-central with different config files.

In this case, how do we specify which plugins are enabled in which instance. Since they are separate processes but would be using the same entry_points.txt file.

The rationale for multiple instances is at https://answers.launchpad.net/ceilometer/+question/220026 .

An workaround would be to run both agent-A and agent-B on different machines. But my doubt is if some other option is available for running on the same machine?

Regards,
Vineet Sharma

Question information

Language:
English Edit question
Status:
Solved
For:
Ceilometer Edit question
Assignee:
No assignee Edit question
Solved by:
Doug Hellmann
Solved:
2013-04-02
Last query:
2013-04-02
Last reply:
2013-03-29
Doug Hellmann (doug-hellmann) said : #1

You should definitely NOT be editing entry_points.txt. That's a python package metadata file, and is not part of the editable configuration files for ceilometer.

Instead, you should use the configuration settings described in http://docs.openstack.org/developer/ceilometer/configuration.html to turn off notification handlers or pollsters (look for the options starting with "disabled_"). If you have multiple copies of a service and want them to be configured differently for some reason, just use different configuration files and pass the config file as an argument to the service when you start it.

visharma (thevineet) said : #2

Ok, I understand that using these keys in the config file we can disable a plugin, e.g.
disabled_central_pollsters = [network_floatingip, image_size]
will disable the mentioned plugins in the agent-central instances which use that particular config file.

But regading the thing about not editing the entry_points file manually,
I would like to know that if I write a new pollster for agent-central, and I do not give the class to invoke the plugin in entry_points.txt like this:
plugin_A = module_A.module_B.python_file_C:class_D
then how will ceilometer know the code to be invoked for a plugin.

If not in entry_points.txt, what is best method to specify the class to invoke a particular plugin ?

Regards,
Vineet Sharma

Best Doug Hellmann (doug-hellmann) said : #3

If you want to add your own pollster, put it in a python package that defines the appropriate entry points and install it. The code that scans the entry points lists looks in all available python packages. See the pkg_resources documentation for details and the setup.py in ceilometer for an example of how to define the entry points. The ceilometer documentation lists the namespaces for each plugin type.

visharma (thevineet) said : #4

Thanks Doug Hellmann, that solved my question.

djiliw (smdjiliw) said : #5

Hi,
Currently I am working with ceilometer.
I saw your comments . please let me know how you have solved your problem with the plugin central agent.
more precisely How to setup ceilomter to permit central agent to read a new plugin ?
What is the file configuration to setup the new agent developped.?

Thanks for help.