aodh/bin/ceilometer-agent-central
Yunhong, Jiang 9335d81316 Support different publisher interval
Changes the agent manager to poll based on pipeline configuration, to
support different interval requirement from different publishers.

This patch clean up the test case for agent managers. It makes the changes
a bit bigger, however, it's not so easy to seprate this cleanup patch
with different interval part.

For bp publisher-counters-frequency

Change-Id: I3c1163e37de6a17261d2c570843845696ebff58f
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
2013-02-22 00:37:57 +08:00

39 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 eNovance <licensing@enovance.com>
#
# Author: Julien Danjou <julien@danjou.info>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import eventlet
eventlet.monkey_patch()
import sys
from oslo.config import cfg
from ceilometer.central import manager
from ceilometer.service import prepare_service
from ceilometer.openstack.common import service
from ceilometer.openstack.common.rpc import service as rpc_service
if __name__ == '__main__':
prepare_service(sys.argv)
mgr = manager.AgentManager()
topic = 'ceilometer.agent.central'
ceilo = rpc_service.Service(cfg.CONF.host,
topic, mgr)
launcher = service.launch(ceilo)
launcher.wait()