|
| 1 | +.. _mcli-atlas-performanceadvisor-namespaces-list-cmd: |
| 2 | + |
| 3 | +================================================= |
| 4 | +mongocli atlas performanceAdvisor namespaces list |
| 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 | +.. include:: /includes/styles/corrections.rst |
| 16 | + |
| 17 | +The ``performanceAdvisor namespaces list`` command |
| 18 | +retrieves a list of collection namespaces experiencing slow |
| 19 | +queries for a specified host. Each namespace includes the database |
| 20 | +name, the dot (``.``) separator, and the collection name |
| 21 | +(e.g. ``<database>.<collection>``). |
| 22 | + |
| 23 | +Syntax |
| 24 | +------ |
| 25 | + |
| 26 | +.. code-block:: text |
| 27 | + |
| 28 | + mongocli atlas performanceadvisor|performanceAdvisor namespaces list|ls |
| 29 | + --processName <host-name> |
| 30 | + [ --since <unix-epoch-timestamp> ] |
| 31 | + [ --duration <milliseconds> ] |
| 32 | + [ --output|-o <output-format> ] |
| 33 | + [ --profile|-P <profile-name> ] |
| 34 | + [ --projectId <project-ID> ] |
| 35 | + |
| 36 | +.. include:: /includes/fact-command-line-help.rst |
| 37 | + |
| 38 | +.. _atlas-performanceadvisor-namespaces-list-options: |
| 39 | + |
| 40 | +Options |
| 41 | +------- |
| 42 | + |
| 43 | +.. list-table:: |
| 44 | + :widths: 20 10 60 10 |
| 45 | + :header-rows: 1 |
| 46 | + |
| 47 | + * - Option |
| 48 | + - Type |
| 49 | + - Description |
| 50 | + - Required? |
| 51 | + |
| 52 | + * - ``--processName`` |
| 53 | + - string |
| 54 | + - The unique identifier of the host of a MongoDB process in the |
| 55 | + following format: ``{hostname}:{port}``. |
| 56 | + - yes |
| 57 | + |
| 58 | + * - ``--since`` |
| 59 | + - integer |
| 60 | + - Point in time, specified as a |epoch-time-ms|, from which you |
| 61 | + want to retrieve results. |
| 62 | + - no |
| 63 | + |
| 64 | + * - ``--duration`` |
| 65 | + - string |
| 66 | + - Length of time from the ``since`` parameter, in milliseconds, |
| 67 | + for which you want to retrieve results. |
| 68 | + - no |
| 69 | + |
| 70 | + * - ``--output``, ``-o`` |
| 71 | + - string |
| 72 | + - .. include:: /includes/extracts/fact-basic-options-output.rst |
| 73 | + - no |
| 74 | + |
| 75 | + * - ``--profile``, ``-P`` |
| 76 | + - string |
| 77 | + - Name of the profile where the public and private |
| 78 | + keys for the project are saved. If omitted, uses the |
| 79 | + {+default-profile+}. To learn more about creating a |
| 80 | + profile, see :ref:`mcli-configure`. |
| 81 | + - no |
| 82 | + |
| 83 | + * - ``--projectId`` |
| 84 | + - string |
| 85 | + - Unique identifier of the project that contains the host |
| 86 | + from which you want to retrieve namespaces for collections with |
| 87 | + slow-running queries. If omitted, uses |
| 88 | + the project ID in the profile or :ref:`environment variable |
| 89 | + <mcli-env-var>`. |
| 90 | + - no |
| 91 | + |
| 92 | +.. _atlas-performanceadvisor-namespaces-list-output: |
| 93 | + |
| 94 | +Output |
| 95 | +------ |
| 96 | + |
| 97 | +If the command succeeds, it returns the following output in the default |
| 98 | +format. If the command returns errors, see |
| 99 | +:ref:`Troubleshooting <troubleshooting>` for recommended solutions. |
| 100 | + |
| 101 | +.. code-block:: sh |
| 102 | + :copyable: false |
| 103 | + |
| 104 | + NAMESPACE TYPE |
| 105 | + <database>.<collection> collection |
| 106 | + |
| 107 | +.. include:: /includes/fact-default-output.rst |
| 108 | + |
| 109 | +- :atlas:`Atlas API </reference/api/pa-namespaces-get-all/>` |
| 110 | + |
| 111 | +Example |
| 112 | +------- |
| 113 | + |
| 114 | +.. tabs:: |
| 115 | + |
| 116 | + .. tab:: Default Output |
| 117 | + :tabid: default-output |
| 118 | + |
| 119 | + The following command retrieves the namespaces for collections |
| 120 | + experiencing slow queries for a project using the |
| 121 | + {+default-profile+}, which contains credentials to access the |
| 122 | + project and the project ID. The output is returned in the default |
| 123 | + format. |
| 124 | + |
| 125 | + .. code-block:: sh |
| 126 | + |
| 127 | + mongocli atlas performanceAdvisor namespaces list --processName atlas-111ggi-shard-00-00.111xx.mongodb.net:27017 |
| 128 | + |
| 129 | + The previous command prints the following to the terminal. |
| 130 | + |
| 131 | + .. code-block:: sh |
| 132 | + :copyable: false |
| 133 | + |
| 134 | + NAMESPACE TYPE |
| 135 | + sample_weatherdata.data collection |
| 136 | + sample_mflix.movies collection |
| 137 | + sample_analytics.transactions collection |
| 138 | + sample_training.grades collection |
| 139 | + sample_training.companies collection |
| 140 | + sample_restaurants.neighborhoods collection |
| 141 | + sample_training.inspections collection |
| 142 | + sample_training.posts collection |
| 143 | + sample_airbnb.listingsAndReviews collection |
| 144 | + |
| 145 | + .. tab:: JSON Output |
| 146 | + :tabid: json-output |
| 147 | + |
| 148 | + The following command retrieves the namespaces for collections |
| 149 | + experiencing slow queries for a project using the |
| 150 | + {+default-profile+}, which contains credentials to access the |
| 151 | + project and the project ID. The output is returned in |json| |
| 152 | + format. |
| 153 | + |
| 154 | + .. code-block:: sh |
| 155 | + |
| 156 | + mongocli atlas performanceAdvisor namespaces list --processName atlas-111ggi-shard-00-00.111xx.mongodb.net:27017 --output json |
| 157 | + |
| 158 | + The previous command prints the following to the terminal in |
| 159 | + |json| format. |
| 160 | + |
| 161 | + .. code-block:: json |
| 162 | + :copyable: false |
| 163 | + |
| 164 | + { |
| 165 | + "namespaces": [ |
| 166 | + { |
| 167 | + "namespace": "sample_weatherdata.data", |
| 168 | + "type": "collection" |
| 169 | + }, |
| 170 | + { |
| 171 | + "namespace": "sample_airbnb.listingsAndReviews", |
| 172 | + "type": "collection" |
| 173 | + }, |
| 174 | + { |
| 175 | + "namespace": "sample_mflix.movies", |
| 176 | + "type": "collection" |
| 177 | + }, |
| 178 | + { |
| 179 | + "namespace": "sample_training.posts", |
| 180 | + "type": "collection" |
| 181 | + }, |
| 182 | + { |
| 183 | + "namespace": "sample_training.inspections", |
| 184 | + "type": "collection" |
| 185 | + }, |
| 186 | + { |
| 187 | + "namespace": "sample_restaurants.neighborhoods", |
| 188 | + "type": "collection" |
| 189 | + }, |
| 190 | + { |
| 191 | + "namespace": "sample_training.grades", |
| 192 | + "type": "collection" |
| 193 | + }, |
| 194 | + { |
| 195 | + "namespace": "sample_analytics.transactions", |
| 196 | + "type": "collection" |
| 197 | + }, |
| 198 | + { |
| 199 | + "namespace": "sample_training.companies", |
| 200 | + "type": "collection" |
| 201 | + } |
| 202 | + ] |
| 203 | + } |
0 commit comments