Skip to content

Commit

Permalink
mgr/telemetry: include balancer info (active=true/false, mode)
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Oct 11, 2019
1 parent ac2c2f7 commit 13976e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pybind/mgr/balancer/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,3 +1322,9 @@ def execute(self, plan):
return r, outs
self.log.debug('done')
return 0, ''

def gather_telemetry(self):
return {
'active': self.active,
'mode': self.mode,
}
7 changes: 7 additions & 0 deletions src/pybind/mgr/telemetry/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,13 @@ def compile_report(self, channels=[]):
for key, value in service_map['services'].items():
report['services'][key] += 1

try:
report['balancer'] = self.remote('balancer', 'gather_telemetry')
except ImportError:
report['balancer'] = {
'active': False
}

if 'crash' in channels:
report['crashes'] = self.gather_crashinfo()

Expand Down

0 comments on commit 13976e5

Please sign in to comment.