Skip to main content
Delphix

Download Masking Debug Logs using the Masking API (KBA10989)

 

 

KBA

KBA#
10989

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Date Release
Mar 20, 2024 | Apr 2, 2024 21.0.0.0 | 21.0.0.1
Feb 21, 2024 20.0.0.0
Jan 25, 2024 19.0.0.0
Dec 20, 2023 | Jan 10, 2024 18.0.0.0 | 18.0.0.1
Nov 21, 2023 17.0.0.0
Oct 18, 2023 16.0.0.0
Sep 21, 2023 15.0.0.0
Aug 24, 2023 14.0.0.0
Jul 24, 2023 13.0.0.0
Jun 21, 2023 12.0.0.0
May 25, 2023 11.0.0.0
Apr 13, 2023 10.0.0.0 | 10.0.0.1

How to extract Masking Debug Logs

You may have to download masking logs for any of the following reasons:

  • Support requested the masking debug logs and you are unable, or it may take too long, to download a support bundle from the Engine (to upload to a support ticket).
  • You would like to review the debug logs to diagnose a failing 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.

This article is applicable to Continuous Data engine (Masking Engine) v10.0 and higher.

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, refer to 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 img3.jpg   and then  img1.jpg .
    Under Parameters, for log_level, select DEBUG from the dropdown list.
    img2.jpg

    Click Execute button.

    This will return the logfile download ID(s) in the Response Body field as per example:
    img5.jpg
  3. Download each debug log file using the File Download Ids (designated with the arrow above).
  4. Click img14.jpg.
  5. In the Parameters field provide the filedownloadId:
    img6.jpg
    Click Execute.

    A successful Get should show something similar to the following:

    :img7.jpg

    Click img8.jpg. This initiates file download to the local desktop or computer.

 

Note

Notes:

  • In this example, only 1 file was downloaded as there was only one debug log (debug.log).
  • A pop-up blocker may have been enabled in your Browser, and block the download.
  •   The following error may occur if the connection to the engine is not via HTTPS.
    img10.jpg
    There is normally an option to allow the download to continue, as per the example below:
    img9.jpg

 

Method 2 : Using Masking API Calls

  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).

    Make a note of the Authorization code or string.

    Alternatively, connect from an O.S. prompt via an API call, this example uses curl:
    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username": "admin","password": "Admin-12"}' 'http://mdmask21001/masking/api/login'

    The above call will return an Authorization string, example:{"Authorization":"4e775519-9d55-4be9-911f-cdf83f6b1c68"}.

    Use the authorization string returned, (which in this example is  4e775519-9d55-4be9-911f-cdf83f6b1c68 )   for the rest of the session.
     
  2. Get the list of File Download Ids needed to execute the download, as seen in the example below.

    Sample command issued using curl:
    curl -X 'GET' \
    'http://mdmask21001/masking/api/v5.1.32/application-logs?log_level=DEBUG&page_number=1' \


    -H 'accept: application/json' \
    -H 'Authorization: 4e775519-9d55-4be9-911f-cdf83f6b1c68'



    or command issued in one command line:
    curl -X 'GET'  'http://mdmask21001/masking/api/v5.1.32/application-logs?log_level=DEBUG&page_number=1'  -H 'accept: application/json' -H 'Authorization: 4e775519-9d55-4be9-911f-cdf83f6b1c68'


    A sample response to expect:
    {"_pageInfo":{"numberOnPage":1,"total":1},"responseList":[{"fileDownloadId":"APPLICATION_LOGS-ZGVidWcubG9n","file-number":0,"logLevel":"DEBUG"}]}

    If there are more than 1 debug log then a list will be returned. The returned list is ordered from the current log or most recent to least recent.
     
  3. Upon downloading the files, download these in order as given in the list, and name these using this pattern:

debug.log (or debug.log.0) for most recent (first in the returned list)

debug.log.1 for next file

debug.log.2

debug.log.3

debug.log.4

….

To download each file use the FileDownloadId , for example:

curl  --output debug.log  -X 'GET' \
'http://mdmask21001/masking/api/file-downloads/APPLICATION_LOGS-ZGVidWcubG9n' \
-H 'accept: application/json' \
-H 'Authorization: 4e775519-9d55-4be9-911f-cdf83f6b1c68'


Or in one command line:

curl  --output debug.log -X 'GET'  'http://mdmask21001/masking/api/file-downloads/APPLICATION_LOGS-ZGVidWcubG9n'   -H 'accept: application/json'  -H 'Authorization: 4e775519-9d55-4be9-911f-cdf83f6b1c68'

The response returned will be similar to:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload   Upload  Total   Spent    Left  Speed

     100  445k    0  445k    0     0   328k      0 --:--:--  0:00:01 --:--:--  328k


Issue an 'ls -lt debug.l*' in the current directory  to check for the debug logs, for example:

ls -lt debug.l*

-rw-r--r--  1 mdmasker  staff  455436 15 Apr 10:25 debug.log

Related Articles

The following articles may provide more information or related information to this article: