Project

General

Profile

Revision 1fd033af

ID1fd033aff40190f4505542861fa45a7a681e5521
Parent 039bdc39
Child 5a8d6210, 469b72f1

Added by John Spray almost 10 years ago

rest_api: Use FSID instead of name in graphite

Fixes: #6883

View differences:

rest-api/calamari_rest/views/v1.py
84 84
            else:
85 85
                return None
86 86

  
87
        # df_path = lambda stat_name: "ceph.cluster.{0}.df.{1}".format(fsid, stat_name)
88
        # TODO: Change names to FSIDs for #6883
89
        df_path = lambda stat_name: "ceph.cluster.{0}.df.{1}".format(self.client.get_cluster(fsid)['name'], stat_name)
87
        df_path = lambda stat_name: "ceph.cluster.{0}.df.{1}".format(fsid, stat_name)
90 88
        space = {
91 89
            'used_bytes': to_bytes(get_latest_graphite(df_path('total_used'))),
92 90
            'capacity_bytes': to_bytes(get_latest_graphite(df_path('total_space'))),
......
409 407
            'name': pool_data['pool_name'],
410 408
            'quota_max_objects': pool_data['quota_max_objects'],
411 409
            'quota_max_bytes': pool_data['quota_max_bytes'],
412
            # TODO: change names to FSIDs for #6883
413
            'used_objects': get_latest_graphite("ceph.cluster.%s.pool.%s.num_objects" % (cluster['name'], pool_data['pool'])),
414
            'used_bytes': get_latest_graphite("ceph.cluster.%s.pool.%s.num_bytes" % (cluster['name'], pool_data['pool']))
410
            'used_objects': get_latest_graphite("ceph.cluster.%s.pool.%s.num_objects" % (cluster['fsid'], pool_data['pool'])),
411
            'used_bytes': get_latest_graphite("ceph.cluster.%s.pool.%s.num_bytes" % (cluster['fsid'], pool_data['pool']))
415 412
        })
416 413

  
417 414
    def list(self, request, fsid):
salt/srv/salt/base/CephCollector.conf
6 6
byte_unit = byte
7 7
socket_path = /var/run/ceph
8 8
socket_ext = asok
9
# TODO: Change names to FSIDs for #6883
10
short_names = True
9
short_names = False
10
service_stats_global = True
11 11
osd_stats_enabled = False
12 12
long_running_detail = False

Also available in: Unified diff