developers to help understand how Ceph is used and what problems users may
be experiencing.
+This data is visualized on `public dashboards <https://telemetry-public.ceph.com/>`_
+that allow the community to quickly see summary statistics on how many clusters
+are reporting, their total capacity and OSD count, and version distribution
+trends.
+
Channels
--------
-The telemetry report is broken down into several "channels," each with
+The telemetry report is broken down into several "channels", each with
a different type of information. Assuming telemetry has been enabled,
individual channels can be turned on and off. (If telemetry is off,
the per-channel setting has no effect.)
* **basic** (default: on): Basic information about the cluster
- capacity of the cluster
- - number of monitors, managers, OSDs, MDSs, radosgws, or other daemons
+ - number of monitors, managers, OSDs, MDSs, object gateways, or other daemons
- software version currently being used
- number and types of RADOS pools and CephFS file systems
- names of configuration options that have been changed from their
"desc": "Show last device report or device report to be sent",
"perm": "r"
},
+ {
+ "cmd": "telemetry show-all",
+ "desc": "Show report of all channels",
+ "perm": "r"
+ },
{
"cmd": "telemetry on name=license,type=CephString,req=false",
"desc": "Enable telemetry reports from this cluster",
elif command['prefix'] == 'telemetry on':
if command.get('license') != LICENSE:
return -errno.EPERM, '', "Telemetry data is licensed under the " + LICENSE_NAME + " (" + LICENSE_URL + ").\nTo enable, add '--license " + LICENSE + "' to the 'ceph telemetry on' command."
- self.set_module_option('enabled', True)
- self.set_module_option('last_opt_revision', REVISION)
+ self.on()
return 0, '', ''
elif command['prefix'] == 'telemetry off':
- self.set_module_option('enabled', False)
- self.set_module_option('last_opt_revision', 1)
+ self.off()
return 0, '', ''
elif command['prefix'] == 'telemetry send':
if self.last_opt_revision < LAST_REVISION_RE_OPT_IN and command.get('license') != LICENSE:
return self.send(self.last_report, command.get('endpoint'))
elif command['prefix'] == 'telemetry show':
- report = self.compile_report(
- channels=command.get('channels', None)
- )
+ report = self.get_report(channels=command.get('channels', None))
report = json.dumps(report, indent=4, sort_keys=True)
if self.channel_device:
- report += '\n \nDevice report is generated separately. To see it run \'ceph telemetry show-device\'.'
+ report += '\n \nDevice report is generated separately. To see it run \'ceph telemetry show-device\'.'
return 0, report, ''
elif command['prefix'] == 'telemetry show-device':
- return 0, json.dumps(self.gather_device_report(), indent=4, sort_keys=True), ''
+ return 0, json.dumps(self.get_report('device'), indent=4, sort_keys=True), ''
+ elif command['prefix'] == 'telemetry show-all':
+ return 0, json.dumps(self.get_report('all'), indent=4, sort_keys=True), ''
else:
return (-errno.EINVAL, '',
"Command not found '{0}'".format(command['prefix']))
+ def on(self):
+ self.set_module_option('enabled', True)
+ self.set_module_option('last_opt_revision', REVISION)
+
+ def off(self):
+ self.set_module_option('enabled', False)
+ self.set_module_option('last_opt_revision', 1)
+
+ def get_report(self, report_type='default', channels=None):
+ if report_type == 'default':
+ return self.compile_report(channels=channels)
+ elif report_type == 'device':
+ return self.gather_device_report()
+ elif report_type == 'all':
+ return {'report': self.compile_report(channels=channels),
+ 'device_report': self.gather_device_report()}
+ return {}
+
def self_test(self):
report = self.compile_report()
if len(report) == 0: