From 677357dd78fbb143c253208b875abde74916c81d Mon Sep 17 00:00:00 2001 From: Christian Zunker Date: Thu, 26 Jul 2018 14:28:50 +0200 Subject: [PATCH] How to configure Telemetry for radosgw Ceilometer cannot query Ceph Rados GW out of the box. This guide explains how to configure ceilometer and ceph to make it work. Change-Id: I81a5778056f851f3624a441318bdcd020ff48687 --- doc/source/user/ceph/ceilometer.rst | 109 ++++++++++++++++++++++++++++ doc/source/user/index.rst | 1 + 2 files changed, 110 insertions(+) create mode 100644 doc/source/user/ceph/ceilometer.rst diff --git a/doc/source/user/ceph/ceilometer.rst b/doc/source/user/ceph/ceilometer.rst new file mode 100644 index 0000000000..d932d12b8d --- /dev/null +++ b/doc/source/user/ceph/ceilometer.rst @@ -0,0 +1,109 @@ +===================================== +Integrate radosgw into your Telemetry +===================================== + +The telemetry (and in consequence accounting) for radosgw as object-storage +will not work out of the box. You need to change different parts of your +OpenStack and Ceph setup to get it up and running. + + +Ceilometer Changes +~~~~~~~~~~~~~~~~~~ + + +Ceilometer needs additional pip packages to talk to Ceph Rados Gateway. To +install it, edit the default ceilometer_pip_packages in your +user_variables.yml file: + +.. code-block:: yaml + + ceilometer_pip_packages: + - ceilometer + - ceilometermiddleware + - cryptography + - gnocchiclient + - libvirt-python + - PyMySQL + - pymongo + - python-ceilometerclient + - python-memcached + - tooz + - warlock + - requests-aws>=0.1.4 #https://github.com/openstack/ceilometer/blob/stable/pike/test-requirements.txt + + +You also have to configure Ceilometer to actually query radosgw. When your +ceilometer isn’t configured to poll everything, add these pollsters to your +polling.yml file: + +.. code-block:: yaml + + - name: radosgw_pollsters + interval: 1200 + meters: + - radosgw.containers.objects + - radosgw.containers.objects.size + - radosgw.objects + - radosgw.objects.size + - radosgw.objects.containers + - radosgw.usage + + +Add them also to your pipeline: + +.. code-block:: yaml + + - name: radosgw_source + interval: 60 + meters: + - "rgw.objects" + - "rgw.objects.size" + - "rgw.objects.containers" + - "rgw.api.request" + - "rgw.containers.objects" + - "rgw.containers.objects.size" + sinks: + - meter_sink + +Declare Ceph Rados Gateway as object-store in your ceilometer.conf file by +adding this to your user_variables.yml file: + +.. code-block:: yaml + + ceilometer_ceilometer_conf_overrides: + service_types: + radosgw: object-store + rgw_admin_credentials: + access_key: XXX + secret_key: XXX + +The required user and credentials is created by this command: + +.. code-block:: bash + + radosgw-admin user create --uid admin --display-name "admin user" --caps "usage=read,write;metadata=read,write;users=read,write;buckets=read,write" + +To get your credentials, execute: + +.. code-block:: bash + + radosgw-admin user info --uid admin | jq '.keys' + +Ceph Changes +~~~~~~~~~~~~ + +The required changes are described in the documentation of Ceilometer. This is +just a sum up. In your ceph.conf add: + +.. code-block:: ini + + [client.radosgw.gateway] + rgw enable usage log = true + rgw usage log tick interval = 30 + rgw usage log flush threshold = 1024 + rgw usage max shards = 32 + rgw usage max user shards = 1 + + + + diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index 59e2239409..a959c26833 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -28,5 +28,6 @@ For in-depth technical information, see the limited-connectivity/index.rst l3pods/example.rst ceph/full-deploy.rst + ceph/ceilometer.rst security/index.rst source-overrides/index.rst