Generic way to specify the endpoint to poll
During the openstack HongKong summit session of how to improve the central agent, it is agreed that we should have a way to allow the administrator to specify which endpoints to poll to get the data from, for the central agent. This will gives the administrators much more flexibility and fine grained control of their deployment. Here we propose the following design to support this.
Changes to the YAML pipeline definition file and pipeline manager
- Adding new optional list item 'resources' in the pipeline definition
The interpretation of the content of the resources list should depend on different pollsters. The pipeline manager will only load the resources from the pipeline file and do a very simple type check.
The new pipeline file would be something like the following:
- name: meter_pipeline interval: 600 meters: - "*" resources: - snmp://10.4.4.4 - ipmi://10.5.5.5 transformers: publishers: - rpc://
Question: Should we explicitly require that the content of the resources should be URI compatible?
Changes to the Pollster class
- new parameter added to the method get_samples to specify the endpoints to get data from
def get_samples(self, manager, cache, resources=):
- new method added to the pollster to verify the resources is legal to this pollster
def verify_resources(self, manager, resources): '''Verify if the resources are legal to this pollster''' return True
Changes to AgentManger and PollingTask
- The PollingTasks class should be modified to support passing resources defined in the pipeline configuration to the corresponding pollsters, and also to verify the resources.
Question: should we make the changes only to the central manager's PollingTask or to the base PollingTask class?