|
| 1 | +.. _mcli-om-server-usage-download-command: |
| 2 | + |
| 3 | +========================================= |
| 4 | +mongocli ops-manager serverUsage download |
| 5 | +========================================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +The ``serverUsage download`` command retrieves a compressed report, in |
| 16 | +``zip`` or ``.tar.gz`` format, of server usage in a given timeframe. |
| 17 | +You can also retrieve this information using the |mms| :opsmgr:`UI |
| 18 | +</admin/general/mongodb-usage-page/>` or :opsmgr:`API |
| 19 | +</reference/api/usage/create-one-report/>`. |
| 20 | + |
| 21 | +.. _om-server-usage-download-syntax: |
| 22 | + |
| 23 | +Syntax |
| 24 | +------ |
| 25 | + |
| 26 | +.. code-block:: text |
| 27 | + |
| 28 | + mongocli ops-manager|om serverUsage download |
| 29 | + [--format <format>] |
| 30 | + [--startDate <start-date>] |
| 31 | + [--endDate <end-date>] |
| 32 | + |
| 33 | +.. include:: /includes/fact-command-line-help.rst |
| 34 | + |
| 35 | +.. _om-server-usage-download-options: |
| 36 | + |
| 37 | +Options |
| 38 | +------- |
| 39 | + |
| 40 | +.. list-table:: |
| 41 | + :header-rows: 1 |
| 42 | + :widths: 20 10 60 10 |
| 43 | + |
| 44 | + * - Option |
| 45 | + - Type |
| 46 | + - Description |
| 47 | + - Required? |
| 48 | + |
| 49 | + * - ``--format`` |
| 50 | + - string |
| 51 | + - Compression format of the resulting report. |mms| accepts **zip** |
| 52 | + or **.tar.gz**. |
| 53 | + - yes |
| 54 | + |
| 55 | + * - ``--startDate`` |
| 56 | + - string |
| 57 | + - |iso8601| formatted date when the report starts. |
| 58 | + - yes |
| 59 | + |
| 60 | + * - ``--endDate`` |
| 61 | + - string |
| 62 | + - |iso8601| formatted date when the report ends. |
| 63 | + - yes |
| 64 | + |
| 65 | +.. _om-server-usage-download-output: |
| 66 | + |
| 67 | +Output |
| 68 | +------ |
| 69 | + |
| 70 | +If the command succeeds, it returns either a ``zip`` or ``.tar.gz`` |
| 71 | +compressed file based on your ``format`` parameter. If the command |
| 72 | +returns errors, see :ref:`Troubleshooting <troubleshooting>` for |
| 73 | +recommended solutions. |
| 74 | + |
| 75 | +For more information, see the :opsmgr:`Ops Manager API </reference/api/usage/create-one-report/>`. |
| 76 | + |
| 77 | +Example |
| 78 | +------- |
| 79 | + |
| 80 | +.. tabs:: |
| 81 | + |
| 82 | + .. tab:: Default Output |
| 83 | + :tabid: default-output |
| 84 | + |
| 85 | + The following command returns a compressed report, in ``zip`` |
| 86 | + format, of server usage in a given timeframe. |
| 87 | + |
| 88 | + .. code-block:: sh |
| 89 | + |
| 90 | + mongocli om serverUsage download -- format zip --startDate 2020-01-01 --endDate 2021-01-01 |
0 commit comments