mgr/telemetry: add enable / disable channel all

Enable or disable all telemetry channels at once with:
    ceph telemetry enable channel all
    ceph telemetry disable channel all

Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
This commit is contained in:
Yaarit Hatuka 2022-01-12 05:57:21 +00:00
parent 71b5aa7d3b
commit 2d1550cf05
2 changed files with 19 additions and 0 deletions

View File

@ -83,6 +83,11 @@ Multiple channels can be enabled or disabled with::
ceph telemetry enable channel basic crash device ident perf
ceph telemetry disable channel basic crash device ident perf
Channels can be enabled or disabled all at once with::
ceph telemetry enable channel all
ceph telemetry disable channel all
Please note that telemetry should be on for these commands to take effect.
List all channels with::

View File

@ -1438,6 +1438,13 @@ To enable, add '--license {LICENSE}' to the 'ceph telemetry on' command.'''
msg = 'Telemetry is now disabled.'
return 0, msg, ''
@CLIReadCommand('telemetry enable channel all')
def enable_channel_all(self, channels: List[str] = ALL_CHANNELS) -> Tuple[int, str, str]:
'''
Enable all channels
'''
return self.toggle_channel('enable', channels)
@CLIReadCommand('telemetry enable channel')
def enable_channel(self, channels: Optional[List[str]] = None) -> Tuple[int, str, str]:
'''
@ -1445,6 +1452,13 @@ To enable, add '--license {LICENSE}' to the 'ceph telemetry on' command.'''
'''
return self.toggle_channel('enable', channels)
@CLIReadCommand('telemetry disable channel all')
def disable_channel_all(self, channels: List[str] = ALL_CHANNELS) -> Tuple[int, str, str]:
'''
Disable all channels
'''
return self.toggle_channel('disable', channels)
@CLIReadCommand('telemetry disable channel')
def disable_channel(self, channels: Optional[List[str]] = None) -> Tuple[int, str, str]:
'''