]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add `enable / disable channel all`
authorYaarit Hatuka <yaarit@redhat.com>
Wed, 12 Jan 2022 05:57:21 +0000 (05:57 +0000)
committerYaarit Hatuka <yaarit@redhat.com>
Thu, 13 Jan 2022 21:54:07 +0000 (21:54 +0000)
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>
doc/mgr/telemetry.rst
src/pybind/mgr/telemetry/module.py

index 6927a19332f04b3582e3660c2cdc3ad3728e1f5b..de2d72f2b67d9a03f51a8ac04b33ccdb4035d6d7 100644 (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::
index 446a1bf1be33a6135ea54b75d532604e85759c6d..ca039afe611bc061618d529dfb88668d59981775 100644 (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]:
         '''