Skip to content

Commit fb1b5b7

Browse files
authored
(DOCSP-12831): Added a page and the navigation for the serverUsage organizations hosts list command. (#396)
* (DOCSP-12831): Added a page and the navigation for the serverUsage organizations hosts list command. * (DOCSP-12831): Fixed TOC entry. * (DOCSP-12831): Incorporated Zach's feedback.
1 parent de58152 commit fb1b5b7

File tree

3 files changed

+174
-4
lines changed

3 files changed

+174
-4
lines changed

source/reference/ops-manager/server-usage-commands.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ Ops Manager ``serverUsage`` Commands
1010
:titlesonly:
1111

1212
List Hosts for a Project </reference/ops-manager/server-usage-list-all-project-hosts>
13+
14+
List Hosts for an Organization </reference/ops-manager/server-usage-list-all-org-hosts>
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. _mcli-om-server-usage-list-org-hosts-command:
2+
3+
========================================================
4+
mongocli ops-manager serverUsage organization hosts 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 ``serverUsage organizations hosts list`` command retrieves all host
16+
assignments for one organization. You can also retrieve this
17+
information using the |mms| :opsmgr:`UI
18+
</admin/general/mongodb-usage-page/>` or :opsmgr:`API
19+
</reference/api/usage/list-all-host-assignments-in-one-organization/>`.
20+
21+
.. _om-server-usage-list-all-org-hosts-syntax:
22+
23+
Syntax
24+
------
25+
26+
.. code-block:: text
27+
28+
mongocli ops-manager|om serverUsage organization|s host|s list|ls
29+
[--orgId <organization-ID>]
30+
[--startDate <start-date>]
31+
[--endDate <end-date>]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _om-server-usage-list-all-org-hosts-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+
* - ``--orgId``
50+
- string
51+
- Unique identifier of the organization associated with the
52+
desired hosts. If omitted, uses the organization ID in
53+
the profile or :ref:`environment variable <mcli-env-var>`.
54+
- no
55+
56+
* - ``--startDate``
57+
- string
58+
- |iso8601| formatted date when the list of host assignments
59+
starts.
60+
- yes
61+
62+
* - ``--endDate``
63+
- string
64+
- |iso8601| formatted date when the list of host assignments ends.
65+
- yes
66+
67+
.. _om-server-usage-list-all-org-hosts-output:
68+
69+
Output
70+
------
71+
72+
If the command succeeds, it returns the following output in the default
73+
format. If the command returns errors, see
74+
:ref:`Troubleshooting <troubleshooting>` for recommended solutions.
75+
76+
.. code-block:: sh
77+
:copyable: false
78+
79+
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE
80+
<domain-name> <host-server-type> <memory-size> <true-or-false>
81+
82+
.. include:: /includes/fact-default-output.rst
83+
84+
- :opsmgr:`Ops Manager API </reference/api/usage/list-all-host-assignments-in-one-organization/>`
85+
86+
Example
87+
-------
88+
89+
.. tabs::
90+
91+
.. tab:: Default Output
92+
:tabid: default-output
93+
94+
The following command retrieves the retrieves all host
95+
assignments for one organization using the {+default-profile+},
96+
which contains credentials to access the organization and the organization ID. The output is returned in the default format.
97+
98+
.. code-block:: sh
99+
100+
mongocli om serverUsage organizations hosts list --startDate 2021-01-01 --endDate 2020-01-01
101+
102+
The previous command prints the following to the terminal.
103+
104+
.. code-block:: sh
105+
:copyable: false
106+
107+
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE
108+
repl-0.example.com PRODUCTION_SERVER 178 true
109+
repl-1.example.com PRODUCTION_SERVER 178 true
110+
repl-2.example.com RAM_POOL 178 true
111+
112+
.. tab:: JSON Output
113+
:tabid: json-output
114+
115+
The following command retrieves the retrieves all host
116+
assignments for one organization using the {+default-profile+},
117+
which contains credentials to access the organization and the
118+
organization ID. The output is returned in |json| format.
119+
120+
.. code-block:: sh
121+
122+
mongocli om serverUsage organizations hosts list --startDate 2021-01-01 --endDate 2020-01-01 --output json
123+
124+
The previous command prints the following to the terminal in
125+
|json| format.
126+
127+
.. code-block:: json
128+
:copyable: false
129+
130+
{
131+
"links": [
132+
{
133+
"rel": "self",
134+
"href": "http://om.example.com/api/public/v1.0/usage/groups/5f1f39ffc902201990f53874/hosts?endDate=2020-01-01\u0026startDate=2021-01-01\u0026pageNum=1\u0026itemsPerPage=100"
135+
},
136+
],
137+
"results":[{
138+
"hostname":"repl-0.example.com",
139+
},
140+
"serverType": {
141+
"name": "PRODUCTION_SERVER",
142+
"label": "Production Server"
143+
},
144+
"isChargeable": true,
145+
"memSizeMB": 178
146+
},
147+
{
148+
"hostname":"repl-2.example.com",
149+
},
150+
"serverType": {
151+
"name": "PRODUCTION_SERVER",
152+
"label": "Production Server"
153+
},
154+
"isChargeable": true,
155+
"memSizeMB": 178
156+
},
157+
"hostname":"repl-3.example.com",
158+
},
159+
"serverType": {
160+
"name": "RAM_POOL",
161+
"label": "RAM Pool"
162+
},
163+
"isChargeable": true,
164+
"memSizeMB": 178
165+
},
166+
]
167+
"totalCount": 3,
168+
}

source/reference/ops-manager/server-usage-list-all-project-hosts.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ format. If the command returns errors, see
7676
.. code-block:: sh
7777
:copyable: false
7878

79-
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE
80-
<fqdn> <host-server-type> <memory-size> <true-or-false>
79+
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE
80+
<domain-name> <host-server-type> <memory-size> <true-or-false>
8181

8282
.. include:: /includes/fact-default-output.rst
8383

@@ -98,7 +98,7 @@ Example
9898

9999
.. code-block:: sh
100100

101-
mongocli om serverUsage projects hosts list --endDate 2020-01-01 --startDate 2021-01-01
101+
mongocli om serverUsage projects hosts list --startDate 2021-01-01 --endDate 2020-01-01
102102

103103
The previous command prints the following to the terminal.
104104

@@ -120,7 +120,7 @@ Example
120120

121121
.. code-block:: sh
122122

123-
mongocli om serverUsage projects hosts list --endDate 2020-01-01 --startDate 2021-01-01 --output json
123+
mongocli om serverUsage projects hosts list --startDate 2021-01-01 --endDate 2020-01-01 --output json
124124

125125
The previous command prints the following to the terminal in
126126
|json| format.

0 commit comments

Comments
 (0)