Download a Support Bundle Via the API (KBA6889)
KBA
KBA# 6889Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0 5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1 ,5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
4.3
4.3.1.0, 4.3.2.0, 4.3.2.1, 4.3.3.0, 4.3.4.0, 4.3.4.1, 4.3.5.0
4.2
4.2.0.0, 4.2.0.3, 4.2.1.0, 4.2.1.1, 4.2.2.0, 4.2.2.1, 4.2.3.0, 4.2.4.0 , 4.2.5.0, 4.2.5.1
4.1
4.1.0.0, 4.1.2.0, 4.1.3.0, 4.1.3.1, 4.1.3.2, 4.1.4.0, 4.1.5.0, 4.1.6.0
How to Task
This article describes how to obtain a support bundle from the Delphix appliance without the use of the GUI. This may be useful in the following scenarios:
- The GUI has become unavailable on older versions due to enforced EOL for Adobe Flash on December 31st 2020.
- A problem specific to the GUI prevents access.
- Automated bundle collection.
Microsoft Windows or Linux/Unix client hosts may be used.
Prerequisites
This method uses just the API to download a support bundle. The procedure is generic. Encapsulate the sequence described using the scripting language of your choice on Linux, Unix, or Microsoft Windows. The examples here all use curl because it is commonly available on all systems, including recent versions of Windows.
To Generate and Download a Support Bundle
- Create a session.
Request
curl -s -X POST -k --data @- https://<DELPHIX_HOSTNAME>/resources/json/delphix/session -c ~/cookies.txt -H "Content-Type: application/json" <<-EOF
{
"type": "APISession",
"version": {
"type": "APIVersion",
"major": 1,
"minor": 5,
"micro": 0
}
}
EOF
Example Response
{"type":"OKResult","status":"OK","result":{"type":"APISession","version":{"type":"APIVersion","major":1,"minor":5,"micro":0},"locale":null,"client":null},"job":null,"action":null}
- Log In.
Request
curl -s -X POST -k --data @- https://<DELPHIX_HOSTNAME>/resources/json/delphix/login -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json" <<-EOF
{
"type": "LoginRequest",
"username": "sysadmin",
"password": "<SYSADMIN_PASSWORD>",
"domain": "SYSTEM"
}
EOF
Example Response
{"type":"OKResult","status":"OK","result":"USER-1","job":null,"action":null}
- Generate a support bundle.
Request
curl -s -X POST -k --data "{}" https://<DELPHIX_HOSTNAME>/resources/json/delphix/service/support/bundle/generate -b ~/cookies.txt -c ~/cookies.txt -H "Content-Type: application/json"
Example Response
{"type":"DataResult","status":"OK","result":"ecb84984-a9fa-41b9-80c4-9a6a4dec6e19", "job":null,"action":"ACTION-51"}
- Download the bundle.
Extract the value of the result field in the response to step 3. This will then be passed as part of the query string for the file download request.
Request
This will result in a file being saved to ~/support_bundle.tgz
.
curl -s -X GET -k https://<DELPHIX_HOSTNAME>/resources/json/delphix/data/download?token=ecb84984-a9fa-41b9-80c4-9a6a4dec6e19 -b ~/cookies.txt -c ~/cookies.txt -o ~/support_bundle.tgz -#
- Troubleshooting.
During the connection to the API, avoid the use of proxy servers, or add the server URL to the bypass rules.
If you encounter a timeout during the connections, add the parameter -m <number of seconds> to increase the max time for the operation to complete:
curl -s -m 3600 -X GET -k https://<DELPHIX_HOSTNAME>/resources/json/delphix/data/download?token=ecb84984-a9fa-41b9-80c4-9a6a4dec6e19 -b ~/cookies.txt -c ~/cookies.txt -o ~/support_bundle.tgz -#
If you still have issues, add the parameter -v to enable the verbose mode and provide this information to the support team for review.
The example below provides a samle reply with the verbose parameter enabled:
curl -s -v -X POST -k --data @- https://<DELPHIX_HOSTNAME>/resources/json/delphix/session -c ~/cookies.txt -H "Content-Type: application/json" <<-EOF { "type": "APISession", "version": { "type": "APIVersion", "major": 1, "minor": 11, "micro": 33 } } * Trying 172.16.1.26:443... * Connected to 172.16.1.26 (172.16.1.26) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * (304) (IN), TLS handshake, Server hello (2): * (304) (IN), TLS handshake, Unknown (8): * (304) (IN), TLS handshake, Certificate (11): * (304) (IN), TLS handshake, CERT verify (15): * (304) (IN), TLS handshake, Finished (20): * (304) (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 / [blank] / UNDEF * ALPN: server accepted http/1.1 * Server certificate: * subject: C=US; CN=localhost * start date: Oct 7 14:21:57 2022 GMT * expire date: Nov 9 14:21:57 2023 GMT * issuer: C=US; CN=Engine localhost CA * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. * using HTTP/1.x > POST /resources/json/delphix/session HTTP/1.1 > Host: 172.16.1.26 > User-Agent: curl/8.6.0 > Accept: */* > Content-Type: application/json > Content-Length: 131 > < HTTP/1.1 200 < Date: Mon, 20 May 2024 16:09:17 GMT < Content-Type: application/json < Content-Length: 181 < Connection: keep-alive * Added cookie JSESSIONID="FEEB4551E8D0733D426E217E9C1209" for domain 172.16.1.26, path /resources, expire 0 < Set-Cookie: JSESSIONID=FEEB4551E8D0733D426E217E9C1209; Path=/resources; Secure; Secure; HttpOnly; SameSite=Lax < Cache-Control: max-age=0 < Expires: Mon, 20 May 2024 16:09:17 GMT < Strict-Transport-Security: max-age=0 < X-Frame-Options: SAMEORIGIN < Content-Security-Policy: font-src 'self' data:; default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; img-src 'self' data:; base-uri 'self'; object-src 'self' < Referrer-Policy: no-referrer < Cache-Control: private < X-Content-Type-Options: nosniff < * Connection #0 to host 172.16.1.26 left intact {"type":"OKResult","status":"OK","result":{"type":"APISession","version":{"type":"APIVersion","major":1,"minor":11,"micro":33},"locale":null,"client":null},"job":null,"action":null}