From 3453930d438dc3ba9ba5addca59aec6786293bd4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 29 Oct 2019 11:14:30 -0500 Subject: [PATCH] mgr/telemetry: include min_mon_release and msgr v1 vs v2 addr count Signed-off-by: Sage Weil --- PendingReleaseNotes | 8 +++++++- src/pybind/mgr/telemetry/module.py | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index a5027defd3a98..94c3dec74bac0 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -200,6 +200,12 @@ - how many data pools - approximate file system age (year + month of creation) + We have also added: + + - which Ceph release the monitors are running + - whether msgr v1 or v2 addresses are used for the monitors + - whether IPv4 or IPv6 addresses are used for the monitors + If you had telemetry enabled, you will need to re-opt-in with:: ceph telemetry on @@ -207,7 +213,7 @@ You can view exactly what information will be reported first with:: ceph telemetry show # see everything - ceph telemetry show basic # basic cluster info, including the new CephFS info + ceph telemetry show basic # basic cluster info (including all of the new info) * Following invalid settings now are not tolerated anymore for the command `ceph osd erasure-code-profile set xxx`. diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index af57787c2138c..aeee3357e44a6 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -371,9 +371,28 @@ class Module(MgrModule): report['created'] = mon_map['created'] + v1_mons = 0 + v2_mons = 0 + ipv4_mons = 0 + ipv6_mons = 0 + for mon in mon_map['mons']: + for a in mon['public_addrs']['addrvec']: + if a['type'] == 'v2': + v2_mons += 1 + elif a['type'] == 'v1': + v1_mons += 1 + if a['addr'].startswith('['): + ipv6_mons += 1 + else: + ipv4_mons += 1 report['mon'] = { 'count': len(mon_map['mons']), - 'features': mon_map['features'] + 'features': mon_map['features'], + 'min_mon_release': mon_map['min_mon_release'], + 'v1_addr_mons': v1_mons, + 'v2_addr_mons': v2_mons, + 'ipv4_addr_mons': ipv4_mons, + 'ipv6_addr_mons': ipv6_mons, } report['config'] = self.gather_configs() -- 2.39.5