Skip to content

Commit e34f8b3

Browse files
authored
(DOCSP-12782): Added a page and the navigation for the agent versions list command. (#401)
* (DOCSP-12782): Added a page and the navigation for the agent versions list command. * (DOCSP-12782): Incorporated JW's feedback.
1 parent 554d956 commit e34f8b3

File tree

2 files changed

+208
-0
lines changed

2 files changed

+208
-0
lines changed

source/reference/ops-manager/agent-commands.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Ops Manager ``agent`` commands
1414
List Agent API Keys </reference/ops-manager/agents-apikey-list>
1515
Create One Agent API Key </reference/ops-manager/agents-apikey-create>
1616
Delete One Agent API Key </reference/ops-manager/agents-apikey-delete>
17+
List Agent Versions </reference/ops-manager/agents-versions-list>
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
.. _mcli-om-agents-list-versions-command:
2+
3+
========================================
4+
mongocli ops-manager agent versions 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+
The ``agent versions list`` command retrieves a list of all
16+
{+mdbagent+}s and their versions in one |onprem| project that you
17+
specify. You can also retrieve this information using the
18+
|mms| :opsmgr:`UI </tutorial/view-agent-status/>` or :opsmgr:`API
19+
</reference/api/agents/get-agent-versions-per-project/>`.
20+
21+
.. _om-agents-list-versions-syntax:
22+
23+
Syntax
24+
------
25+
26+
.. code-block:: sh
27+
28+
mongocli ops-manager|om agent|s version|s list|ls
29+
[--projectId <project-ID>]
30+
[--profile|-P <profile-name>]
31+
[ --output|-o <output-format> ]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _om-agents-list-versions-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+
* - ``--projectId``
50+
- string
51+
- .. include:: /includes/extracts/fact-basic-options-project-id.rst
52+
- no
53+
54+
* - ``--profile``, ``-P``
55+
- string
56+
- .. include:: /includes/extracts/fact-basic-options-profile.rst
57+
- no
58+
59+
* - ``--output``, ``-o``
60+
- string
61+
- .. include:: /includes/extracts/fact-basic-options-output.rst
62+
- no
63+
64+
.. _om-agents-list-output:
65+
66+
Output
67+
------
68+
69+
If the command succeeds, it returns the following output in the default
70+
format. If the command returns errors, see
71+
:ref:`Troubleshooting <troubleshooting>` for recommended solutions.
72+
73+
.. code-block:: sh
74+
:copyable: false
75+
76+
HOSTNAME ADDRESS VERSION DEPRECATED
77+
<domain-name> <ip-address> <agent-version> <true-or-false>
78+
79+
.. include:: /includes/fact-default-output.rst
80+
81+
- :opsmgr:`Ops Manager API
82+
</reference/api/agents/get-agent-versions-per-project>`
83+
84+
Example
85+
-------
86+
87+
.. tabs::
88+
89+
.. tab:: Default Output
90+
:tabid: default-output
91+
92+
The following command retrieves a list of all {+mdbagent+}s and
93+
their versions in one |onprem| project that you specify using
94+
the {+default-profile+}, which contains credentials to access the
95+
project and the project ID. The output is returned in the default
96+
format.
97+
98+
.. code-block:: sh
99+
100+
mongocli om agent versions list
101+
102+
The previous command prints the following to the terminal.
103+
104+
.. code-block:: sh
105+
:copyable: false
106+
107+
HOSTNAME ADDRESS VERSION DEPRECATED
108+
repl-0.example.com 192.0.2.0 10.14.18.6453 false
109+
repl-1.example.com 192.0.2.1 10.14.18.6453 false
110+
repl-2.example.com 192.0.2.2 10.14.18.6453 false
111+
112+
.. tab:: JSON Output
113+
:tabid: json-output
114+
115+
The following command retrieves a list of all {+mdbagent+}s and
116+
their versions in one |onprem| project that you specify using the
117+
{+default-profile+}, which contains credentials to access the
118+
project and the project ID. The output is returned in |json|
119+
format.
120+
121+
.. code-block:: sh
122+
123+
mongocli om agent versions list --output json
124+
125+
The previous command prints the following to the terminal in
126+
|json| format.
127+
128+
.. code-block:: json
129+
:copyable: false
130+
131+
{
132+
"count": 3,
133+
"entries": [
134+
{
135+
"address": "192.0.2.0",
136+
"confCount": 1710429,
137+
"hostname": "repl-0.example.com ",
138+
"hostnameShort": "repl-0.example.com ",
139+
"isManaged": true,
140+
"isModule": true,
141+
"isPrimary": false,
142+
"isVersionOld": false,
143+
"isVersionDeprecated": false,
144+
"lastConf": 1611174341721,
145+
"lastPing": 0,
146+
"msSinceLastConf": 9940,
147+
"numProcess": 1,
148+
"pingCount": 0,
149+
"pingState": "ok",
150+
"tagName": "",
151+
"version": "10.14.18.6453"
152+
},
153+
{
154+
"address": 192.0.2.1",
155+
"confCount": 1523759,
156+
"hostname": "repl-1.example.com ,
157+
"hostnameShort": "repl-1.example.com ",
158+
"isManaged": true,
159+
"isModule": true,
160+
"isPrimary": false,
161+
"isVersionOld": false,
162+
"isVersionDeprecated": false,
163+
"lastConf": 1611174341715,
164+
"lastPing": 0,
165+
"msSinceLastConf": 9946,
166+
"numProcess": 0,
167+
"pingCount": 0,
168+
"pingState": "ok",
169+
"tagName": "",
170+
"version": "10.14.18.6453"
171+
},
172+
{
173+
"address": "192.0.2.2",
174+
"confCount": 1523745,
175+
"hostname": "repl-2.example.com ",
176+
"hostnameShort": "repl-2.example.com ",
177+
"isManaged": true,
178+
"isModule": true,
179+
"isPrimary": false,
180+
"isVersionOld": false,
181+
"isVersionDeprecated": false,
182+
"lastConf": 1611174341715,
183+
"lastPing": 0,
184+
"msSinceLastConf": 9946,
185+
"numProcess": 0,
186+
"pingCount": 0,
187+
"pingState": "ok",
188+
"tagName": "",
189+
"version": "10.14.18.6453"
190+
}
191+
],
192+
"isAnyAgentNotManaged": false,
193+
"isAnyAgentVersionDeprecated": false,
194+
"isAnyAgentVersionOld": false,
195+
"links": [
196+
{
197+
"rel": "self",
198+
"href": "http://om.example.com/api/public/v1.0/groups/5f1f39ffc902201990f53873/agents/current"
199+
},
200+
{
201+
"rel": "http://mms.mongodb.com/group",
202+
"href": "http://om.example.com/api/public/v1.0/groups/5f1f39ffc902201990f53873"
203+
}
204+
],
205+
"minimumAgentVersionDetected": "10.14.18.6453",
206+
"minimumVersion": "10.14.0.6306"
207+
}

0 commit comments

Comments
 (0)