Skip to main content
Delphix

Downloading Masking Logs Without Downloading a Support Bundle (KBA6734)

 
Lock2-01.png

This document is for internal use only.

 

KBA

KBA# 6734

How 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

Note

Note:

The logs will be returned in order from current/most recent, to the least recent.

  1. 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)
  2. Get a list of the Debug logs to be downloaded by clicking on  clipboard_ec722ee100abae4bbadd4a48074dc0265.png , and then  clipboard_e517a10ddaacd805b29ce70c29c58e81a.png
  3. Under Parameters, for log_level, select DEBUG from the dropdown list.
  4. Click Try it out:
    clipboard_e35d3d9e27183f207ce8685f267963492.png
    This will return the logfile download IDs in the Response Body field:
    clipboard_e3deb665d8343d7fb5409b9a36160ef2e.png
  5. Download each debug log file using the File Download Ids.
    1. Click on  clipboard_e8197713aa317f27feaf06b1664fbcdb3.png then  clipboard_e6f722a58f269d18b290203e8f0207920.png.
    2. Under ‘Parameters’ provide the filedownloadId:
      clipboard_e02e80dfc53f77ad09beb81ff9827b9cf.png
    3. Click clipboard_e2a6c79da5ce3e88d75e348ee909a6de0.png.
      The ‘Response Body’ will then have underneath it, something similar to:
      clipboard_e1fcd0ac38b620f7a804f096811334bf7.png
    4. Click on the ‘Download APPLICATION LOGS-<reference>’  clipboard_e770a6b637520ad599613b2001dc1c63b.png
      This downloads the file to your computer. Dependent on your operating system, the downloaded file may have a filename like:clipboard_e49d7a03a8df03bcb5c083e834b2959d9.png

 

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.

  1. 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"}
  2. 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"}]}

  1. 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: