]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/mgr/influx: use :confval: directive 41473/head
authorKefu Chai <kchai@redhat.com>
Fri, 21 May 2021 07:21:48 +0000 (15:21 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 May 2021 00:59:29 +0000 (08:59 +0800)
less repeating this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/mgr/influx.rst
src/pybind/mgr/influx/module.py

index 9a770530ac94b8216e5d6f1a2c9f4ab91304323b..2622d3919d08a2aff750276b5ba5567517c1d670 100644 (file)
@@ -2,6 +2,8 @@
 Influx Module 
 =============
 
+.. mgr_module:: influx
+
 The influx module continuously collects and sends time series data to an
 influxdb database.
 
@@ -13,14 +15,14 @@ Enabling
 
 To enable the module, use the following command:
 
-::
+.. prompt:: bash $
 
     ceph mgr module enable influx
 
 If you wish to subsequently disable the module, you can use the equivalent
 *disable* command:
 
-::
+.. prompt:: bash $
 
     ceph mgr module disable influx
 
@@ -34,29 +36,33 @@ credentials.
 
 Set configuration values using the following command:
 
-::
+.. prompt:: bash $
 
     ceph config set mgr mgr/influx/<key> <value>
 
 
-The most important settings are ``hostname``, ``username`` and ``password``.  
+The most important settings are :confval:`mgr/influx/hostname`,
+:confval:`mgr/influx/username` and :confval:`mgr/influx/password`.
 For example, a typical configuration might look like this:
 
-::
+.. prompt:: bash $
 
     ceph config set mgr mgr/influx/hostname influx.mydomain.com
     ceph config set mgr mgr/influx/username admin123
     ceph config set mgr mgr/influx/password p4ssw0rd
     
-Additional optional configuration settings are:
-
-:interval: Time between reports to InfluxDB.  Default 30 seconds.
-:database: InfluxDB database name.  Default "ceph".  You will need to create this database and grant write privileges to the configured username or the username must have admin privileges to create it.  
-:port: InfluxDB server port.  Default 8086
-:ssl: Use https connection for InfluxDB server. Use "true" or "false". Default false
-:verify_ssl: Verify https cert for InfluxDB server. Use "true" or "false". Default true
-:threads: How many worker threads should be spawned for sending data to InfluxDB. Default is 5
-:batch_size: How big batches of data points should be when sending to InfluxDB. Default is 5000
+Following is the list of all configuration settings:
+
+.. confval:: hostname
+.. confval:: username
+.. confval:: password
+.. confval:: interval
+.. confval:: database
+.. confval:: port
+.. confval:: ssl
+.. confval:: verify_ssl
+.. confval:: threads
+.. confval:: batch_size
 
 ---------
 Debugging 
@@ -65,9 +71,11 @@ Debugging
 By default, a few debugging statements as well as error statements have been set to print in the log files. Users can add more if necessary.
 To make use of the debugging option in the module:
 
-- Add this to the ceph.conf file.::
+- Add this to the ceph.conf file.
+
+  .. code-block:: ini
 
-    [mgr]
+     [mgr]
         debug_mgr = 20  
 
 - Use this command ``ceph influx self-test``.
index e71bfbcfdb7ff98593589516cd95dd6ec34a7349..334b6c77f9f48eb49b0251c2ac3c6c4434d54690 100644 (file)
@@ -21,32 +21,45 @@ except ImportError:
 class Module(MgrModule):
     MODULE_OPTIONS = [
         Option(name='hostname',
-               default=None),
+               default=None,
+               desc='InfluxDB server hostname'),
         Option(name='port',
                type='int',
-               default=8086),
+               default=8086,
+               desc='InfluxDB server port'),
         Option(name='database',
-               default='ceph'),
+               default='ceph',
+               desc=('InfluxDB database name. You will need to create this '
+                     'database and grant write privileges to the configured '
+                     'username or the username must have admin privileges to '
+                     'create it.')),
         Option(name='username',
-               default=None),
+               default=None,
+               desc='username of InfluxDB server user'),
         Option(name='password',
-               default=None),
+               default=None,
+               desc='password of InfluxDB server user'),
         Option(name='interval',
                type='secs',
                min=5,
-               default=30),
+               default=30,
+               desc='Time between reports to InfluxDB.  Default 30 seconds.'),
         Option(name='ssl',
-               default='false'),
+               default='false',
+               desc='Use https connection for InfluxDB server. Use "true" or "false".'),
         Option(name='verify_ssl',
-               default='true'),
+               default='true',
+               desc='Verify https cert for InfluxDB server. Use "true" or "false".'),
         Option(name='threads',
                type='int',
                min=1,
                max=32,
-               default=5),
+               default=5,
+               desc='How many worker threads should be spawned for sending data to InfluxDB.'),
         Option(name='batch_size',
                type='int',
-               default=5000),
+               default=5000,
+               desc='How big batches of data points should be when sending to InfluxDB.'),
     ]
 
     @property