Merge "cleanup gnocchiclient"
This commit is contained in:
commit
e5f117b24a
@ -179,7 +179,6 @@ class GnocchiDispatcher(dispatcher.MeterDispatcherBase,
|
||||
look like the following:
|
||||
|
||||
[dispatcher_gnocchi]
|
||||
url = http://localhost:8041
|
||||
archive_policy = low
|
||||
|
||||
To enable this dispatcher, the following section needs to be present in
|
||||
|
@ -13,19 +13,12 @@
|
||||
|
||||
from gnocchiclient import client
|
||||
from gnocchiclient import exceptions as gnocchi_exc
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
from ceilometer import keystone_client
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
OPTS = [
|
||||
cfg.StrOpt('url',
|
||||
deprecated_for_removal=True,
|
||||
help='URL to Gnocchi. default: autodetection'),
|
||||
]
|
||||
|
||||
|
||||
def get_gnocchiclient(conf, endpoint_override=None):
|
||||
session = keystone_client.get_session(conf)
|
||||
|
@ -257,7 +257,6 @@ function _ceilometer_configure_storage_backend {
|
||||
iniset $CEILOMETER_CONF database event_connection mongodb://localhost:27017/ceilometer
|
||||
iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer
|
||||
elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
|
||||
gnocchi_url=$(gnocchi_service_url)
|
||||
iniset $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi
|
||||
iniset $CEILOMETER_CONF DEFAULT event_dispatchers gnocchi
|
||||
# NOTE(gordc): set higher retry in case gnocchi is started after ceilometer on a slow machine
|
||||
@ -265,7 +264,6 @@ function _ceilometer_configure_storage_backend {
|
||||
# NOTE(gordc): set batching to better handle recording on a slow machine
|
||||
iniset $CEILOMETER_CONF collector batch_size 50
|
||||
iniset $CEILOMETER_CONF collector batch_timeout 5
|
||||
iniset $CEILOMETER_CONF dispatcher_gnocchi url $gnocchi_url
|
||||
iniset $CEILOMETER_CONF dispatcher_gnocchi archive_policy ${GNOCCHI_ARCHIVE_POLICY}
|
||||
if is_service_enabled swift && [[ "$GNOCCHI_STORAGE_BACKEND" = 'swift' ]] ; then
|
||||
iniset $CEILOMETER_CONF dispatcher_gnocchi filter_service_activity "True"
|
||||
|
Loading…
Reference in New Issue
Block a user