Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/modules/idrac_diagnostics.rst

raw
1 .. _idrac_diagnostics_module:
2
3
4 idrac_diagnostics -- Run and Export iDRAC diagnostics
5 =====================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows you to run and export diagnostics on iDRAC.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - python \>= 3.9.6
24
25
26
27 Parameters
28 ----------
29
30 run (optional, bool, None)
31 Run the diagnostics job on iDRAC.
32
33 Run the diagnostics job based on the \ :emphasis:`run\_mode`\ and save the report in the internal storage. \ :emphasis:`reboot\_type`\ is applicable.
34
35
36 export (optional, bool, None)
37 Exports the diagnostics information to the given share.
38
39 This operation requires \ :emphasis:`share\_parameters`\ .
40
41 When \ :emphasis:`run`\ is \ :literal:`true`\ and \ :emphasis:`job\_wait`\ is \ :literal:`false`\ , only then the run diagnostics job is triggered. \ :emphasis:`export`\ is ignored.
42
43
44 run_mode (optional, str, express)
45 This option provides the choices to run the diagnostics.
46
47 \ :literal:`express`\ The express diagnostics runs a test package for each server subsystem. However, it does not run the complete set of tests available in the package for each subsystem.
48
49 \ :literal:`extended`\ The extended diagnostics run all available tests in each test package for all subsystems.
50
51 \ :literal:`long\_run`\ The long-run diagnostics runs express and extended tests.
52
53
54 reboot_type (optional, str, graceful)
55 This option provides the choice to reboot the host immediately to run the diagnostics.
56
57 This is applicable when \ :emphasis:`run`\ is \ :literal:`true`\ .
58
59 \ :literal:`force`\ Forced graceful shutdown signals the operating system to turn off and wait for ten minutes. If the operating system does not turn off, the iDRAC power cycles the system.
60
61 \ :literal:`graceful`\ Graceful shutdown waits for the operating system to turn off and wait for the system to restart.
62
63 \ :literal:`power\_cycle`\ performs a power cycle for a hard reset on the device.
64
65
66 scheduled_start_time (optional, str, None)
67 Schedules the job at the specified time.
68
69 The accepted formats are yyyymmddhhmmss and YYYY-MM-DDThh:mm:ss+HH:MM.
70
71 This is applicable when \ :emphasis:`run`\ is \ :literal:`true`\ and \ :emphasis:`reboot\_type`\ is power\_cycle.
72
73
74 scheduled_end_time (optional, str, None)
75 Run the diagnostic until the specified end date and end time after the \ :emphasis:`scheduled\_start\_time`\ .
76
77 The accepted formats are yyyymmddhhmmss and YYYY-MM-DDThh:mm:ss+HH:MM.
78
79 If the run operation does not complete before the specified end time, then the operation fails.
80
81 This is applicable when \ :emphasis:`run`\ is \ :literal:`True`\ and \ :emphasis:`reboot\_type`\ is \ :literal:`power\_cycle`\ .
82
83
84 job_wait (optional, bool, True)
85 Provides the option to wait for job completion.
86
87 This is applicable when \ :emphasis:`run`\ is \ :literal:`true`\ and \ :emphasis:`reboot\_type`\ is \ :literal:`power\_cycle`\ .
88
89 This is applicable only to run the diagnostics job.
90
91
92 job_wait_timeout (optional, int, 1200)
93 Time in seconds to wait for job completion.
94
95 This is applicable when \ :emphasis:`job\_wait`\ is \ :literal:`true`\ .
96
97
98 share_parameters (optional, dict, None)
99 Parameters that are required for the export operation of diagnostics.
100
101 \ :emphasis:`share\_parameters`\ is required when \ :emphasis:`export`\ is \ :literal:`true`\ .
102
103
104 share_type (optional, str, local)
105 Share type of the network share.
106
107 \ :literal:`local`\ uses local path for \ :emphasis:`export`\ operation.
108
109 \ :literal:`nfs`\ uses NFS share for \ :emphasis:`export`\ operation.
110
111 \ :literal:`cifs`\ uses CIFS share for \ :emphasis:`export`\ operation.
112
113 \ :literal:`http`\ uses HTTP share for \ :emphasis:`export`\ operation.
114
115 \ :literal:`https`\ uses HTTPS share for \ :emphasis:`export`\ operation.
116
117
118 file_name (optional, str, None)
119 Diagnostics file name for \ :emphasis:`export`\ operation.
120
121
122 ip_address (optional, str, None)
123 IP address of the network share.
124
125 \ :emphasis:`ip\_address`\ is required when \ :emphasis:`share\_type`\ is \ :literal:`nfs`\ , \ :literal:`cifs`\ , \ :literal:`http`\ or \ :literal:`https`\ .
126
127
128 share_name (optional, str, None)
129 Network share or local path of the diagnostics file.
130
131
132 workgroup (optional, str, None)
133 Workgroup of the network share.
134
135 \ :emphasis:`workgroup`\ is applicable only when \ :emphasis:`share\_type`\ is \ :literal:`cifs`\ .
136
137
138 username (optional, str, None)
139 Username of the network share.
140
141 \ :emphasis:`username`\ is required when \ :emphasis:`share\_type`\ is \ :literal:`cifs`\ .
142
143
144 password (optional, str, None)
145 Password of the network share.
146
147 \ :emphasis:`password`\ is required when \ :emphasis:`share\_type`\ is \ :literal:`cifs`\ .
148
149
150 ignore_certificate_warning (optional, str, off)
151 Ignores the certificate warning while connecting to Share and is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`https`\ .
152
153 \ :literal:`on`\ ignores the certificate warning.
154
155 \ :literal:`off`\ does not ignore the certificate warning.
156
157
158 proxy_support (optional, str, off)
159 Specifies if proxy support must be used or not.
160
161 \ :literal:`off`\ does not use proxy settings.
162
163 \ :literal:`default\_proxy`\ uses the default proxy settings.
164
165 \ :literal:`parameters\_proxy`\ uses the specified proxy settings. \ :emphasis:`proxy\_server`\ is required when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
166
167 \ :emphasis:`proxy\_support`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ .
168
169
170 proxy_type (optional, str, http)
171 The proxy type of the proxy server.
172
173 \ :literal:`http`\ to select HTTP proxy.
174
175 \ :literal:`socks`\ to select SOCKS proxy.
176
177 \ :emphasis:`proxy\_type`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ and when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
178
179
180 proxy_server (optional, str, None)
181 The IP address of the proxy server.
182
183 \ :emphasis:`proxy\_server`\ is required when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
184
185 \ :emphasis:`proxy\_server`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ and when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
186
187
188 proxy_port (optional, int, 80)
189 The port of the proxy server.
190
191 \ :emphasis:`proxy\_port`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ and when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
192
193
194 proxy_username (optional, str, None)
195 The username of the proxy server.
196
197 \ :emphasis:`proxy\_username`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ and when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
198
199
200 proxy_password (optional, str, None)
201 The password of the proxy server.
202
203 \ :emphasis:`proxy\_password`\ is only applicable when \ :emphasis:`share\_type`\ is \ :literal:`http`\ or \ :literal:`https`\ and when \ :emphasis:`proxy\_support`\ is \ :literal:`parameters\_proxy`\ .
204
205
206
207 resource_id (optional, str, None)
208 Id of the resource.
209
210 If the value for resource ID is not provided, the module picks the first resource ID available from the list of system resources returned by the iDRAC.
211
212
213 idrac_ip (True, str, None)
214 iDRAC IP Address.
215
216
217 idrac_user (False, str, None)
218 iDRAC username.
219
220 If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used.
221
222 Example: export IDRAC\_USERNAME=username
223
224
225 idrac_password (False, str, None)
226 iDRAC user password.
227
228 If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used.
229
230 Example: export IDRAC\_PASSWORD=password
231
232
233 x_auth_token (False, str, None)
234 Authentication token.
235
236 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used.
237
238 Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token
239
240
241 idrac_port (optional, int, 443)
242 iDRAC port.
243
244
245 validate_certs (optional, bool, True)
246 If \ :literal:`false`\ , the SSL certificates will not be validated.
247
248 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
249
250 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
251
252
253 ca_path (optional, path, None)
254 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
255
256
257 timeout (optional, int, 30)
258 The socket level timeout in seconds.
259
260
261
262
263
264 Notes
265 -----
266
267 .. note::
268 - Run this module from a system that has direct access to Dell iDRAC.
269 - This module supports only iDRAC9 and above.
270 - This module supports IPv4 and IPv6 addresses.
271 - This module supports \ :literal:`check\_mode`\ .
272 - This module requires 'Dell Diagnostics' firmware package to be present on the server.
273 - When \ :emphasis:`share\_type`\ is \ :literal:`local`\ for \ :emphasis:`export`\ operation, job\_details are not displayed.
274
275
276
277
278 Examples
279 --------
280
281 .. code-block:: yaml+jinja
282
283
284 ---
285 - name: Run and export the diagnostics to local path
286 dellemc.openmanage.idrac_diagnostics:
287 hostname: "192.168.0.1"
288 username: "username"
289 password: "password"
290 ca_path: "path/to/ca_file"
291 run: true
292 export: true
293 share_parameters:
294 share_type: "local"
295 share_path: "/opt/local/diagnostics/"
296 file_name: "diagnostics.txt"
297
298 - name: Run the diagnostics with power cycle reboot on schedule
299 dellemc.openmanage.idrac_diagnostics:
300 hostname: "192.168.0.1"
301 username: "username"
302 password: "password"
303 ca_path: "path/to/ca_file"
304 run: true
305 run_mode: "express"
306 reboot_type: "power_cycle"
307 scheduled_start_time: 20240101101015
308
309 - name: Run and export the diagnostics to HTTPS share
310 dellemc.openmanage.idrac_diagnostics:
311 hostname: "192.168.0.1"
312 username: "username"
313 password: "password"
314 ca_path: "path/to/ca_file"
315 run: true
316 export: true
317 share_parameters:
318 share_type: "HTTPS"
319 ignore_certificate_warning: "on"
320 share_name: "/share_path/diagnostics_collection_path"
321 ip_address: "192.168.0.2"
322 file_name: "diagnostics.txt"
323
324 - name: Run and export the diagnostics to NFS share
325 dellemc.openmanage.idrac_diagnostics:
326 hostname: "192.168.0.1"
327 username: "username"
328 password: "password"
329 ca_path: "path/to/ca_file"
330 run: true
331 export: true
332 share_parameters:
333 share_type: "NFS"
334 share_name: "nfsshare/diagnostics_collection_path/"
335 ip_address: "192.168.0.3"
336 file_name: "diagnostics.txt"
337
338 - name: Export the diagnostics to CIFS share
339 dellemc.openmanage.idrac_diagnostics:
340 hostname: "192.168.0.1"
341 username: "username"
342 password: "password"
343 ca_path: "path/to/ca_file"
344 export: true
345 share_parameters:
346 share_type: "CIFS"
347 share_name: "/cifsshare/diagnostics_collection_path/"
348 ip_address: "192.168.0.4"
349 file_name: "diagnostics.txt"
350
351 - name: Export the diagnostics to HTTPS share via proxy
352 dellemc.openmanage.idrac_diagnostics:
353 hostname: "192.168.0.1"
354 username: "username"
355 password: "password"
356 ca_path: "path/to/ca_file"
357 export: true
358 share_parameters:
359 share_type: "HTTPS"
360 share_name: "/share_path/diagnostics_collection_path"
361 ignore_certificate_warning: "on"
362 ip_address: "192.168.0.2"
363 file_name: "diagnostics.txt"
364 proxy_support: parameters_proxy
365 proxy_type: http
366 proxy_server: "192.168.0.5"
367 proxy_port: 1080
368 proxy_username: "proxy_user"
369 proxy_password: "proxy_password"
370
371
372
373 Return Values
374 -------------
375
376 msg (always, str, Successfully ran and exported the diagnostics.)
377 Status of the diagnostics operation.
378
379
380 job_details (For run and export operations, dict, {'ActualRunningStartTime': '2024-01-10T10:14:31', 'ActualRunningStopTime': '2024-01-10T10:26:34', 'CompletionTime': '2024-01-10T10:26:34', 'Description': 'Job Instance', 'EndTime': '2024-01-10T10:30:15', 'Id': 'JID_XXXXXXXXXXXX', 'JobState': 'Completed', 'JobType': 'RemoteDiagnostics', 'Message': 'Job completed successfully.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'SYS018', 'Name': 'Remote Diagnostics', 'PercentComplete': 100, 'StartTime': '2024-01-10T10:12:15', 'TargetSettingsURI': None})
381 Returns the output for status of the job.
382
383
384 diagnostics_file_path (For export operation, str, /share_path/diagnostics_collection_path/diagnostics.txt)
385 Returns the full path of the diagnostics file.
386
387
388 error_info (on HTTP error, dict, {'error': {'code': 'Base.1.12.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'Message': 'A Remote Diagnostic (ePSA) job already exists.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.2.9.SYS098', 'RelatedProperties': [], '[email protected]': 0, 'Resolution': 'A response action is not required if the scheduled start time of the existing Remote Diagnostic (ePSA) job is ok. Else, delete the existing Diagnostics (ePSA) job and recreate another with an appropriate start time.', 'Severity': 'Informational'}]}})
389 Details of the HTTP Error.
390
391
392
393
394
395 Status
396 ------
397
398
399
400
401
402 Authors
403 ~~~~~~~
404
405 - Shivam Sharma(@ShivamSh3)
406