Give a chestnut! Tableau Tips (81): Server Log Cleanup and Level Settings

published: 2021-05-26

Tableau's logs record information about software system issues and also monitor events that occur in the system. The user can use it to check the cause of the error. Its existence is like a monitoring, which can give users a lot of protection.

However, the storage of the log will take up your hard disk space, and the log level settings will affect your software performance. Therefore, we need to clean up the logs periodically to free up the hard disk storage and set the appropriate log level.

In this issue of "Have a Chestnut", the Tableau skills that Ada wants to share with you are: server log cleanup and level setting.

For the sake of learning, we will teach you how to clean up existing logs and how to set the level of logs. (This document applies to the Windows environment Tableau Server 2018.2 and above, and the Linux environment Tableau Server 10.5 and above.)

Specific steps are as follows:

【Existing log】

When there is not enough storage space, we can remove the Tableau Server log files on Tableau Server to free up more space.

❶ Open cmd as an administrator and enter

tsm maintenance cleanup。

If prompted to log in, enter the corresponding password according to the prompted windows user. (The screen will not be displayed when you enter the password. Press Enter when you have finished typing.)

❷ After entering the password, the log will be cleared. (The default is to clean up the days before 1 day)

❸ If you want to change the number of days to clear the log. can use:

--log-files-retention <days>

Delete logs before this number of days.

Tips: -v is the details that show the cleaned up content.

【set the log level】

The following logging levels are listed in ascending order of the amount of information logged:

Off

Fatal

Error

Warn (warning)

Info (the default) (information (default))

Debug

Trace

You can adjust the journal level to a higher debug and trace when needed. However, these two log levels will consume performance, so it is recommended to use the default log level.

Set the logging level for Tableau Server using one of several tsm configuration set commands. The command you use depends on which component of Tableau Server you want to change the logging level.

Set a higher log level

❶ Enter tsm stop to stop Tableau Server.

❷ by input

tsm configuration set -k <config_key> -v <value>

To set the logging level where <config_key> is

<process>.native_api.log.level、vizportal.log.level

Or vizqlserver.log.level

<value> is a valid logging level.

E.g:

❸ Enter the tsm pending-changes apply command to apply the changes.

❹ View the log level of the current system by entering the tsm configuration get -k <config_key> command. (Verify if we have changed successfully)

❺Enter tsm start to start the Tableau Server server.

Restore log level to system default

❶ Enter tsm stop to stop Tableau Server.

Enter the tsm configuration set -k <config_key> -d command to restore the log to the system default level. Don't forget to apply the changes using the tsm pending-changes apply command. Finally, type tsm start to start Tableau Server.

❷ Last pass

tsm configuration get -k <config_key>

The command verifies that the log level has replied to the info (default) level.

Today's Tableau trick, are you getting it?Open your Tableau and try it out!