With OpenStack it is an ease to provide an object store backed up from your Ceph RadosGW. But getting the usage metrics from Ceph into Ceilometer and Gnocchi is a little bit tricky. At least if you use OpenStack Pike. Following the official Pike documentation we need a RadosGW user with the correct credentials, usage logging enabled and a little bit of Ceilometer configuration:
$ radosgw-admin user create --uid ceilometer --display-name "ceilometer" --caps "usage=read;metadata=read;users=read;buckets=read"
# ceilometer.conf [service_types] radosgw = object-store [rgw_admin_credentials] access_key = access secret_key = secret
Additionally we need to add the radosgw.* metrics to your ceilometer polling.yaml. At this point the official documentation lets you down with inconsistent metric names. In Pike, there are no entry points for radosgw.* metrics, only for the old rgw.* metrics. This is described in the bug #1726458. But following the defined entry points into the code, we see that these creates the new radosgw.* metrics. Well, adding the old metric names to your polling.yaml delivers you the new metric names… ¯\_(ツ)_/¯
# polling.yaml - name: radosgw_pollsters interval: 1200 meters: - rgw.containers.objects - rgw.containers.objects.size - rgw.objects - rgw.objects.size - rgw.objects.containers - rgw.usage
To bring it to an end, restarting “ceilometer central” will deliver your RadwosGW metrics to Gnocchi.