Skip to content

Troubleshooting Ranger Tag-Sync

Log File Location for Ranger Tag-Sync

There are a couple of different ways to access the Tag-Sync log file/s.

Privacera Diagnostic Tool

You can use the Privacera Diagnostic Tool to view the logs for Ranger Tag-Sync. After logging into the Privacera Diagnostics Server, go the tagsync pod and click on the POD EXPLORER tab and click on the service_logs link to view the logs.

Kubectl or K9s

You can access the Ranger Tag-Sync pod using kubectl or K9s. The log files for the Ranger Tag-Sync service are located in the following directory:

Bash
cd /opt/ranger/ranger-tagsync/log

Log Files

The following log file(s) are relevant for Ranger Tag-Sync:

Log File Description
tagsync.log Contains the log messages for tagsync.

Enable Debug Logging

To enable debug logging for Ranger Tag-Sync, you can set the TAGSYNC_RANGER_LOG_LEVEL configuration parameter to DEBUG(Default value is INFO). This configuration allows you to view the detailed logs for Ranger Tag-Sync to troubleshoot issues.

Please follow the steps below to enable debug logging for Ranger Tag-Sync:

  1. SSH into the instance where Privacera Manager is installed.
  2. Navigate to the Privacera Manager directory using the following command:
    Bash
    cd ~/privacera/privacera-manager/
    
  3. Run the following command to edit the 'var.ranger-tagsync.yml' file.
    Bash
     # Add below property in the vars.ranger-tagsync.yml file and set it to DEBUG
     vi config/custom-vars/vars.ranger-tagsync.yml
    
  4. Add the following property and set it to DEBUG. If the property already exists, update the value to DEBUG.

    YAML
    TAGSYNC_RANGER_LOG_LEVEL: "DEBUG"
    
  5. After adding the properties, update your Privacera Manager platform instance by following the Restart Services section.

  6. After restarting the Ranger Tag-Sync service, you should be able to see detailed logs in the Ranger Tag-Sync log files.

Revert to Default Log Level INFO

It is not advised to run Ranger Tag-Sync with debug logging enabled in production environments. To revert to the default log level, set the TAGSYNC_ROOT_LOG_LEVEL configuration parameter to INFO or comment out the property in the custom-vars/vars.ranger-tagsync.yml file. After making the changes, save the file and run the commands to apply the configuration changes and restart the Ranger Admin service:

Debug Level Logging

Running Ranger Tag-Sync with debug logging enabled can generate a large volume of log messages, which may impact the performance of the Tag-Sync service. It is recommended to use debug logging only for troubleshooting purposes and revert to the default log level once the issue is resolved.

Comments