Debian Codegraph @

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

raw
1 .. _ome_diagnostics_module:
2
3
4 ome_diagnostics -- Export technical support logs(TSR) to network share location
5 ===============================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows to export SupportAssist collection logs from OpenManage Enterprise and OpenManage Enterprise Modular and application logs from OpenManage Enterprise Modular to a CIFS or NFS share.
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 device_ids (optional, list, None)
31 List of target device IDs.
32
33 This is applicable for \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ logs.
34
35 This option is mutually exclusive with \ :emphasis:`device\_service\_tags`\ and \ :emphasis:`device\_group\_name`\ .
36
37
38 device_service_tags (optional, list, None)
39 List of target identifier.
40
41 This is applicable for \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ logs.
42
43 This option is mutually exclusive with \ :emphasis:`device\_ids`\ and \ :emphasis:`device\_group\_name`\ .
44
45
46 device_group_name (optional, str, None)
47 Name of the device group to export \ :literal:`support\_assist\_collection`\ or \ :literal:`supportassist\_collection`\ logs of all devices within the group.
48
49 This is applicable for \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ logs.
50
51 This option is not applicable for OpenManage Enterprise Modular.
52
53 This option is mutually exclusive with \ :emphasis:`device\_ids`\ and \ :emphasis:`device\_service\_tags`\ .
54
55
56 log_type (optional, str, support_assist_collection)
57 \ :literal:`application`\ is applicable for OpenManage Enterprise Modular to export the application log bundle.
58
59 \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ is applicable for one or more devices to export SupportAssist logs.
60
61 \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ supports both OpenManage Enterprise and OpenManage Enterprise Modular.
62
63 \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ does not support export of \ :literal:`OS\_LOGS`\ from OpenManage Enterprise. If tried to export, the tasks will complete with errors, and the module fails.
64
65
66 mask_sensitive_info (optional, bool, False)
67 Select this option to mask the personal identification information such as IPAddress, DNS, alert destination, email, gateway, inet6, MacAddress, netmask etc.
68
69 This option is applicable for \ :literal:`application`\ of \ :emphasis:`log\_type`\ .
70
71
72 log_selectors (optional, list, None)
73 By default, the SupportAssist logs contain only hardware logs. To collect additional logs such as OS logs, RAID logs or Debug logs, specify the log types to be collected in the choices list.
74
75 If the log types are not specified, only the hardware logs are exported.
76
77 \ :literal:`OS\_LOGS`\ to collect OS Logs.
78
79 \ :literal:`RAID\_LOGS`\ to collect RAID controller logs.
80
81 \ :literal:`DEBUG\_LOGS`\ to collect Debug logs.
82
83 This option is applicable only for \ :literal:`support\_assist\_collection`\ and \ :literal:`supportassist\_collection`\ of \ :emphasis:`log\_type`\ .
84
85
86 share_address (True, str, None)
87 Network share IP address.
88
89
90 share_name (True, str, None)
91 Network share path.
92
93 Filename is auto generated and should not be provided as part of \ :emphasis:`share\_name`\ .
94
95
96 share_type (True, str, None)
97 Network share type
98
99
100 share_user (optional, str, None)
101 Network share username.
102
103 This option is applicable for \ :literal:`CIFS`\ of \ :emphasis:`share\_type`\ .
104
105
106 share_password (optional, str, None)
107 Network share password
108
109 This option is applicable for \ :literal:`CIFS`\ of \ :emphasis:`share\_type`\ .
110
111
112 share_domain (optional, str, None)
113 Network share domain name.
114
115 This option is applicable for \ :literal:`CIFS`\ if \ :emphasis:`share\_type`\ .
116
117
118 job_wait (optional, bool, True)
119 Whether to wait for the Job completion or not.
120
121 The maximum wait time is \ :emphasis:`job\_wait\_timeout`\ .
122
123
124 job_wait_timeout (optional, int, 60)
125 The maximum wait time of \ :emphasis:`job\_wait`\ in minutes.
126
127 This option is applicable \ :emphasis:`job\_wait`\ is true.
128
129
130 test_connection (optional, bool, False)
131 Test the availability of the network share location.
132
133 \ :emphasis:`job\_wait`\ and \ :emphasis:`job\_wait\_timeout`\ options are not applicable for \ :emphasis:`test\_connection`\ .
134
135
136 lead_chassis_only (optional, bool, False)
137 Extract the logs from Lead chassis only.
138
139 \ :emphasis:`lead\_chassis\_only`\ is only applicable when \ :emphasis:`log\_type`\ is \ :literal:`application`\ on OpenManage Enterprise Modular.
140
141
142 hostname (True, str, None)
143 OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname.
144
145
146 username (False, str, None)
147 OpenManage Enterprise or OpenManage Enterprise Modular username.
148
149 If the username is not provided, then the environment variable \ :envvar:`OME\_USERNAME`\ is used.
150
151 Example: export OME\_USERNAME=username
152
153
154 password (False, str, None)
155 OpenManage Enterprise or OpenManage Enterprise Modular password.
156
157 If the password is not provided, then the environment variable \ :envvar:`OME\_PASSWORD`\ is used.
158
159 Example: export OME\_PASSWORD=password
160
161
162 x_auth_token (False, str, None)
163 Authentication token.
164
165 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`OME\_X\_AUTH\_TOKEN`\ is used.
166
167 Example: export OME\_X\_AUTH\_TOKEN=x\_auth\_token
168
169
170 port (optional, int, 443)
171 OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
172
173
174 validate_certs (optional, bool, True)
175 If \ :literal:`false`\ , the SSL certificates will not be validated.
176
177 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
178
179 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
180
181
182 ca_path (optional, path, None)
183 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
184
185
186 timeout (optional, int, 30)
187 The socket level timeout in seconds.
188
189
190
191
192
193 Notes
194 -----
195
196 .. note::
197 - Run this module from a system that has direct access to OpenManage Enterprise.
198 - This module performs the test connection and device validations. It does not create a job for copying the logs in check mode and always reports as changes found.
199 - This module supports \ :literal:`check\_mode`\ .
200
201
202
203
204 Examples
205 --------
206
207 .. code-block:: yaml+jinja
208
209
210 ---
211 - name: Export application log using CIFS share location
212 dellemc.openmanage.ome_diagnostics:
213 hostname: "192.168.0.1"
214 username: "username"
215 password: "password"
216 ca_path: "/path/to/ca_cert.pem"
217 share_type: CIFS
218 share_address: "192.168.0.2"
219 share_user: share_username
220 share_password: share_password
221 share_name: cifs_share
222 log_type: application
223 mask_sensitive_info: false
224 test_connection: true
225
226 - name: Export application log using NFS share location
227 dellemc.openmanage.ome_diagnostics:
228 hostname: "192.168.0.1"
229 username: "username"
230 password: "password"
231 ca_path: "/path/to/ca_cert.pem"
232 share_address: "192.168.0.3"
233 share_type: NFS
234 share_name: nfs_share
235 log_type: application
236 mask_sensitive_info: true
237 test_connection: true
238
239 - name: Export SupportAssist log using CIFS share location
240 dellemc.openmanage.ome_diagnostics:
241 hostname: "192.168.0.1"
242 username: "username"
243 password: "password"
244 ca_path: "/path/to/ca_cert.pem"
245 share_address: "192.168.0.3"
246 share_user: share_username
247 share_password: share_password
248 share_name: cifs_share
249 share_type: CIFS
250 log_type: support_assist_collection
251 device_ids: [10011, 10022]
252 log_selectors: [OS_LOGS]
253 test_connection: true
254
255 - name: Export SupportAssist log using NFS share location
256 dellemc.openmanage.ome_diagnostics:
257 hostname: "192.168.0.1"
258 username: "username"
259 password: "password"
260 ca_path: "/path/to/ca_cert.pem"
261 share_address: "192.168.0.3"
262 share_type: NFS
263 share_name: nfs_share
264 log_type: support_assist_collection
265 device_group_name: group_name
266 test_connection: true
267
268
269
270 Return Values
271 -------------
272
273 msg (always, str, Export log job completed successfully.)
274 Overall status of the export log.
275
276
277 jog_status (success, dict, {'Builtin': False, 'CreatedBy': 'root', 'Editable': True, 'EndTime': 'None', 'Id': 12778, 'JobDescription': 'Export device log', 'JobName': 'Export Log', 'JobStatus': {'Id': 2080, 'Name': 'New'}, 'JobType': {'Id': 18, 'Internal': False, 'Name': 'DebugLogs_Task'}, 'LastRun': '2021-07-06 10:52:50.519', 'LastRunStatus': {'Id': 2060, 'Name': 'Completed'}, 'NextRun': 'None', 'Schedule': 'startnow', 'StartTime': 'None', 'State': 'Enabled', 'UpdatedBy': 'None', 'UserGenerated': True, 'Visible': True, 'Params': [{'JobId': 12778, 'Key': 'maskSensitiveInfo', 'Value': 'FALSE'}, {'JobId': 12778, 'Key': 'password', 'Value': 'tY86w7q92u0QzvykuF0gQQ'}, {'JobId': 12778, 'Key': 'userName', 'Value': 'administrator'}, {'JobId': 12778, 'Key': 'shareName', 'Value': 'iso'}, {'JobId': 12778, 'Key': 'OPERATION_NAME', 'Value': 'EXTRACT_LOGS'}, {'JobId': 12778, 'Key': 'shareType', 'Value': 'CIFS'}, {'JobId': 12778, 'Key': 'shareAddress', 'Value': '100.96.32.142'}], 'Targets': [{'Data': '', 'Id': 10053, 'JobId': 12778, 'TargetType': {'Id': 1000, 'Name': 'DEVICE'}}]})
278 Details of the export log operation status.
279
280
281 error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}})
282 Details of the HTTP Error.
283
284
285
286
287
288 Status
289 ------
290
291
292
293
294
295 Authors
296 ~~~~~~~
297
298 - Felix Stephen (@felixs88)
299 - Sachin Apagundi(@sachin-apa)
300