Skip to content

Commit de58152

Browse files
authored
(DOCSP-12830): Added a page and the navigation for the serverUsage projects hosts list command. (#393)
* (DOCSP-12830): Added a page and the navigation for the serverUsage projects hosts list command. * (DOCSP-12830): Updated the ISO 8601 substitution and addressed build errors for missing :tabids:. * (DOCSP-12830): Fixed UI link. * (DOCSP-12830): Incorporated Chris's feedback. * (DOCSP-12830): Small code-block tweak.
1 parent 327a4c5 commit de58152

File tree

7 files changed

+199
-1
lines changed

7 files changed

+199
-1
lines changed

source/reference/atlas/integration-create.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ command to integrate the specified third-party service with
151151
.. tabs::
152152

153153
.. tab:: Default Output
154+
:tabid: default-output
154155

155156
.. code-block:: text
156157

@@ -164,6 +165,7 @@ command to integrate the specified third-party service with
164165
Flowdock integration configured.
165166

166167
.. tab:: JSON Output
168+
:tabid: json-output
167169

168170
.. code-block:: text
169171

source/reference/atlas/integration-describe.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ solutions.
113113
.. tabs::
114114

115115
.. tab:: Datadog
116+
:tabid: datadog
116117

117118
.. code-block:: sh
118119
:copyable: false
@@ -121,6 +122,7 @@ solutions.
121122
DATADOG <API-key> <API-region>
122123

123124
.. tab:: Flowdock
125+
:tabid: flowdock
124126

125127
.. code-block:: sh
126128
:copyable: false
@@ -129,6 +131,7 @@ solutions.
129131
FLOWDOCK <API-token> <flow-name> <organization-name>
130132

131133
.. tab:: New Relic
134+
:tabid: new-relic
132135

133136
.. code-block:: sh
134137
:copyable: false
@@ -137,6 +140,7 @@ solutions.
137140
NEW_RELIC <account-ID> <license-key> <write-token> <read-token>
138141

139142
.. tab:: Opsgenie
143+
:tabid: Opsgenie
140144

141145
.. code-block:: sh
142146
:copyable: false
@@ -145,6 +149,7 @@ solutions.
145149
OPS_GENIE <API-key> <API-region>
146150

147151
.. tab:: PagerDuty
152+
:tabid: pagerduty
148153

149154
.. code-block:: sh
150155
:copyable: false
@@ -153,6 +158,7 @@ solutions.
153158
PAGER_DUTY <service-key>
154159

155160
.. tab:: Slack
161+
:tabid: slack
156162

157163
.. code-block:: sh
158164
:copyable: false
@@ -161,6 +167,7 @@ solutions.
161167
SLACK <API-token> <team-name> <channel-name>
162168

163169
.. tab:: VictorOps
170+
:tabid: victorops
164171

165172
.. code-block:: sh
166173
:copyable: false
@@ -169,6 +176,7 @@ solutions.
169176
VICTOR_OPS <API-key>
170177

171178
.. tab:: Webhooks
179+
:tabid: webhooks
172180

173181
.. code-block:: sh
174182
:copyable: false
@@ -192,7 +200,8 @@ It uses the {+default-profile+} for accessing |service|.
192200

193201
.. tabs::
194202

195-
.. tab:: Default output
203+
.. tab:: Default output
204+
:tabid: default-output
196205

197206
.. code-block:: sh
198207

@@ -207,6 +216,7 @@ It uses the {+default-profile+} for accessing |service|.
207216
FLOWDOCK a1234b5678c9d1e23b437784b4ec3XXX Sample MONGODB
208217

209218
.. tab:: JSON output
219+
:tabid: json-output
210220

211221
.. code-block:: sh
212222

source/reference/atlas/integration-list.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ for accessing |service|.
102102
.. tabs::
103103

104104
.. tab:: Default output
105+
:tabid: default-output
105106

106107
.. code-block:: sh
107108

@@ -117,6 +118,7 @@ for accessing |service|.
117118
FLOWDOCK
118119

119120
.. tab:: JSON output
121+
:tabid: json-output
120122

121123
.. code-block:: sh
122124

source/reference/atlas/integration-update.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ command to modify the specified third-party service integration with
149149
.. tabs::
150150

151151
.. tab:: Default Output
152+
:tabid: default-output
152153

153154
.. code-block:: text
154155

@@ -162,6 +163,7 @@ command to modify the specified third-party service integration with
162163
Flowdock integration configured.
163164

164165
.. tab:: JSON Output
166+
:tabid: json-output
165167

166168
.. code-block:: text
167169

source/reference/ops-manager.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ Ops Manager ``mongocli`` Commands
9090
Process </reference/ops-manager/process-commands>
9191
Security </reference/ops-manager/security-commands>
9292
Servers </reference/ops-manager/server-commands>
93+
Server Usage </reference/ops-manager/server-usage-commands>
9394
Version Manifest </reference/ops-manager/version-manifest-commands>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _mcli-reference-om-server-usage:
2+
3+
====================================
4+
Ops Manager ``serverUsage`` Commands
5+
====================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
List Hosts for a Project </reference/ops-manager/server-usage-list-all-project-hosts>
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
.. _mcli-om-server-usage-list-project-hosts-command:
2+
3+
===================================================
4+
mongocli ops-manager serverUsage project 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 projects hosts list`` command retrieves all host
16+
assignments for one project. You can also retrieve this information
17+
using the |mms| :opsmgr:`UI </admin/general/mongodb-usage-page/>` or
18+
:opsmgr:`API
19+
</reference/api/usage/list-all-host-assignments-in-one-project/>`.
20+
21+
.. _om-server-usage-list-all-project-hosts-syntax:
22+
23+
Syntax
24+
------
25+
26+
.. code-block:: text
27+
28+
mongocli ops-manager|om serverUsage project|s host|s list|ls
29+
[--projectId <project-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-project-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+
* - ``--projectId``
50+
- string
51+
- Unique identifier of the project associated with the
52+
desired hosts. If omitted, uses the project 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-project-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+
<fqdn> <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-project/>`
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 project using the {+default-profile+}, which
96+
contains credentials to access the project and the project ID.
97+
The output is returned in the default format.
98+
99+
.. code-block:: sh
100+
101+
mongocli om serverUsage projects hosts list --endDate 2020-01-01 --startDate 2021-01-01
102+
103+
The previous command prints the following to the terminal.
104+
105+
.. code-block:: sh
106+
:copyable: false
107+
108+
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE
109+
repl-0.example.com PRODUCTION_SERVER 178 true
110+
repl-1.example.com PRODUCTION_SERVER 178 true
111+
repl-2.example.com RAM_POOL 178 true
112+
113+
.. tab:: JSON Output
114+
:tabid: json-output
115+
116+
The following command retrieves the retrieves all host
117+
assignments for one project using the {+default-profile+}, which
118+
contains credentials to access the project and the project ID.
119+
The output is returned in |json| format.
120+
121+
.. code-block:: sh
122+
123+
mongocli om serverUsage projects hosts list --endDate 2020-01-01 --startDate 2021-01-01 --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+
"links": [
133+
{
134+
"rel": "self",
135+
"href": "http://om.example.com/api/public/v1.0/usage/groups/5f1f39ffc902201990f53873/hosts?endDate=2020-01-01\u0026startDate=2021-01-01\u0026pageNum=1\u0026itemsPerPage=100"
136+
},
137+
],
138+
"results":[{
139+
"hostname":"repl-0.example.com",
140+
},
141+
"serverType": {
142+
"name": "PRODUCTION_SERVER",
143+
"label": "Production Server"
144+
},
145+
"isChargeable": true,
146+
"memSizeMB": 178
147+
},
148+
{
149+
"hostname":"repl-2.example.com",
150+
},
151+
"serverType": {
152+
"name": "PRODUCTION_SERVER",
153+
"label": "Production Server"
154+
},
155+
"isChargeable": true,
156+
"memSizeMB": 178
157+
},
158+
"hostname":"repl-3.example.com",
159+
},
160+
"serverType": {
161+
"name": "RAM_POOL",
162+
"label": "RAM Pool"
163+
},
164+
"isChargeable": true,
165+
"memSizeMB": 178
166+
},
167+
]
168+
"totalCount": 3,
169+
}

0 commit comments

Comments
 (0)