diff --git a/doc/mgr/telemetry.rst b/doc/mgr/telemetry.rst index 34b50ccc3fb91..7c4f8668bb7df 100644 --- a/doc/mgr/telemetry.rst +++ b/doc/mgr/telemetry.rst @@ -21,6 +21,8 @@ the per-channel setting has no effect.) - number of monitors, managers, OSDs, MDSs, radosgws, 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 + default (but *not* their values) * **crash** (default: on): Information about daemon crashes, including diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index eace93ee45476..1b4154f13d70f 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -78,7 +78,7 @@ class Module(MgrModule): 'name': 'channel_basic', 'type': 'bool', 'default': True, - 'description': 'Share basic cluster information (size, version)', + 'desc': 'Share basic cluster information (size, version)', }, { 'name': 'channel_ident', @@ -192,6 +192,26 @@ def gather_mon_metadata(self, mon_map): return metadata + def gather_configs(self): + configs = set() + r, outb, outs = self.mon_command({ + 'prefix': 'config dump', + 'format': 'json' + }); + if r != 0: + return {} + try: + dump = json.loads(outb) + except json.decoder.JSONDecodeError: + return {} + for opt in dump: + name = opt.get('name') + if name: + configs.add(name) + return { + 'non_default_options': [ sorted(list(configs)) ] + } + def gather_crashinfo(self): crashlist = list() errno, crashids, err = self.remote('crash', 'ls') @@ -255,6 +275,8 @@ def compile_report(self, channels=[]): 'features': mon_map['features'] } + report['config'] = self.gather_configs() + num_pg = 0 report['pools'] = list() for pool in osd_map['pools']: