Downloading Masking Logs Without Downloading a Support Bundle (KBA6734)
This document is for internal use only.
KBA
KBA# 6734How to Download Masking Debug Logs
You may have to download masking logs for any of the following reasons:
- Delphix Support requested the masking debug logs and you are unable or it may take too long to download a support bundle from the Engine (for upload to the support ticket).
- You would like to review the debug logs to diagnose a failed masking job.
You can download the masking logs using the Masking API, either using the Masking API client GUI or using API calls from the OS prompt.
Method 1: Using the Masking API Client GUI
- Connect or login to the Masking API client and authorize. For more information, see https://support.delphix.com/Delphix_Masking_Engine/Logging_into_and_Connecting_to_the_Masking_API_Client_(KBA5754)
- Get a list of the Debug logs to be downloaded by clicking on , and then .
- Under Parameters, for log_level, select DEBUG from the dropdown list.
- Click Try it out:
This will return the logfile download IDs in the Response Body field:
- Download each debug log file using the File Download Ids.
- Click on then .
- Under ‘Parameters’ provide the filedownloadId:
- Click .
The ‘Response Body’ will then have underneath it, something similar to:
- Click on the ‘Download APPLICATION LOGS-<reference>’
This downloads the file to your computer. Dependent on your operating system, the downloaded file may have a filename like:
If you open the file with a Text Editor, you will see log information, examples below:
2020-11-14 10:40:12,895 Masking Engine Version: 6.0.4.2 (d6e651e2bb29a8b84caed4b58e1f03cbd87a5245), September 17, 2020
2020-11-14 10:40:12,890 [pool-1-thread-2] DEBUG com.querydsl.jpa.impl.JPAQuery - select mountInformation from MountInformation mountInformation where mountInformation.status = ?1
2020-11-14 10:40:12,897 [pool-1-thread-2] DEBUG c.d.manager.MountFilesystemManager - Running mount consistency check
2020-11-14 10:45:12,890 [pool-1-thread-1] DEBUG com.querydsl.jpa.impl.JPAQuery - select mountInformation from MountInformation mountInformation where mountInformation.status = ?1
2020-11-14 10:45:12,891 [pool-1-thread-1] DEBUG c.d.manager.MountFilesystemManager - Running mount consistency check
2020-11-17 13:08:43,879 [http-nio-127.0.0.1-8284-exec-4] DEBUG com.querydsl.jpa.impl.JPAQuery - select userLogin from UserLogin userLogin where lower(userLogin.userLoginNm) = ?1
2020-11-17 13:08:43,882 [http-nio-127.0.0.1-8284-exec-4] DEBUG com.querydsl.jpa.impl.JPAQuery - select userLogin from UserLogin userLogin where lower(userLogin.userLoginNm) = ?1
2020-11-17 13:08:43,887 [http-nio-127.0.0.1-8284-exec-4] INFO c.d.common.utils.FileDownloadUtil - Downloading file /var/delphix/masking/logs/AppLogs/debug.log
Method 2 : Using Masking API Calls
This method is quicker and allows you to name the log files as you download them.
- Connect or login to the Masking API client and authorize. For more information, see https://support.delphix.com/Delphix_Masking_Engine/Logging_into_and_Connecting_to_the_Masking_API_Client_(KBA5754)
or via an API call, as seen below:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"username": "admin",
"password": "Admin-12"
}' 'http://dlpx-5371-mds-2853-d2b9cd33.d...king/api/login'
The above call will return an Authorization string:
{“Authorization":"7fcfc710-ed6f-4924-83c2-c494897a18df"}
- Get the list of File Download Ids needed to execute the download, as seen in the examle below:
Sample command issued at OS prompt using curl:
curl -X GET --header 'Accept: application/json' --header 'Authorization: 7fcfc710-ed6f-4924-83c2-c494897a18df' 'http://dlpx-5371-mds-2853-d2b9cd33.dcol2.delphix.com/masking/api/application-logs?log_level=DEBUG&page_number=1'
Sample response to expect:
{"_pageInfo":{"numberOnPage":12,"total":12},"responseList":[{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9n","file-number":0,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjE=","file-number":1,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjI=","file-number":2,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjM=","file-number":3,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjQ=","file-number":4,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjU=","file-number":5,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjY=","file-number":6,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjc=","file-number":7,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjg=","file-number":8,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjk=","file-number":9,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjEw","file-number":10,"logLevel":"DEBUG"},{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9nLjEx","file-number":11,"logLevel":"DEBUG"}]}
- To download each file, consult these examples using curl:
curl -o debug.log.0 -X GET --header 'Accept: application/octet-stream' --header 'Authorization: 7fcfc710-ed6f-4924-83c2-c494897a18df' 'http://dlpx-5371-mds-2853-d2b9cd33.dcol2.delphix.com/masking/api/file-downloads/APPLICATION_LOGS-ZGVidWcubG9n'
curl -o debug.log.1 -X GET --header 'Accept: application/octet-stream' --header 'Authorization: 7fcfc710-ed6f-4924-83c2-c494897a18df' 'http://dlpx-5371-mds-2853-d2b9cd33.dcol2.delphix.com/masking/api/file-downloads/APPLICATION_LOGS-ZGVidWcubG9nLjE='
If you open debug.log.1, you will see log entries like the following:
2020-11-13 19:35:23,571 Masking Engine Version: 6.0.4.2 (d6e651e2bb29a8b84caed4b58e1f03cbd87a5245), September 17, 2020
2020-11-13 19:35:23,567 [http-nio-127.0.0.1-8284-exec-3] DEBUG com.querydsl.jpa.impl.JPAQuery - select execution from Execution execution where execution.job.jobId = ?1 order by execution.submitTime desc
2020-11-13 19:35:23,572 [http-nio-127.0.0.1-8284-exec-3] DEBUG com.querydsl.jpa.impl.JPAQuery - select execution from Execution execution where execution.job.jobId = ?1 order by execution.submitTime desc
2020-11-13 19:35:23,576 [http-nio-127.0.0.1-8284-exec-3] DEBUG com.querydsl.jpa.impl.JPAQuery - select inventoryApproval from InventoryApproval inventoryApproval where inventoryApproval.collectionName = ?1 and inventoryApproval.environmentId = ?2 order by inventoryApproval.approvalId desc
Related Articles
The following articles may provide more information or related information to this article: