Skip to content

Commit d97bc7d

Browse files
authored
(DOCSP-12301) atlas|cm|om performanceAdvisor namespaces list (#277)
* (DOCSP-12301) atlas|cm|om performanceAdvisor namespaces list
1 parent 6b22218 commit d97bc7d

9 files changed

+662
-1
lines changed

source/reference/atlas.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ Atlas ``mongocli`` Commands
4646
Manage :atlas:`online archives </online-archive/manage-online-archive/>`
4747
for a cluster.
4848

49+
:ref:`performanceAdvisor <mcli-reference-atlas-performanceadvisor>`
50+
Retrieve information generated by the
51+
:atlas:`Performance Advisor </performance-advisor/>` about slow
52+
queries.
53+
4954
:ref:`process <mcli-reference-atlas-process>`
5055
Retrieve information about MongoDB processes running on a specified
5156
|service| project.
@@ -70,6 +75,7 @@ Atlas ``mongocli`` Commands
7075
Maintenance Window </reference/atlas/maintenanceWindow-commands>
7176
Metrics </reference/atlas/metric-commands>
7277
Networking </reference/atlas/networking-commands>
78+
Performance Advisor </reference/atlas/performanceadvisor-commands>
7379
Private Endpoints </reference/atlas/privateendpoint-commands>
7480
Processes </reference/atlas/process-commands>
7581
Security </reference/atlas/security-commands>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _mcli-reference-atlas-performanceadvisor:
2+
3+
=====================================
4+
Atlas ``performanceAdvisor`` Commands
5+
=====================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
List Namespaces for a Host </reference/atlas/performanceadvisor-namespaces-list>
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
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+
}

source/reference/cloud-manager.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Cloud Manager ``mongocli`` Commands
3636
:ref:`metric <mcli-reference-cm-metric>`
3737
Lists metrics for MongoDB processes on a specified host.
3838

39+
:ref:`performanceAdvisor <mcli-reference-cm-performanceadvisor>`
40+
Retrieve information generated by the
41+
:cloudmgr:`Performance Advisor </tutorial/performance-advisor/>`
42+
about slow queries.
43+
3944
:ref:`process <mcli-reference-cm-process>`
4045
Retrieves information about MongoDB processes running on a specified
4146
|cloud| project.
@@ -62,6 +67,7 @@ Cloud Manager ``mongocli`` Commands
6267
Events </reference/cloud-manager/event-commands>
6368
Maintenance Window </reference/cloud-manager/maintenanceWindow-commands>
6469
Metrics </reference/cloud-manager/metric-commands>
70+
Performance Advisor </reference/cloud-manager/performanceadvisor-commands>
6571
Processes </reference/cloud-manager/process-commands>
6672
Security </reference/cloud-manager/security-commands>
6773
Servers </reference/cloud-manager/server-commands>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _mcli-reference-cm-performanceadvisor:
2+
3+
=============================================
4+
Cloud Manager ``performanceAdvisor`` Commands
5+
=============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
List Namespaces for a Host </reference/cloud-manager/performanceadvisor-namespaces-list>

0 commit comments

Comments
 (0)