Yugabyte Log Rotation

Hi, I would like to know if yugabyte does any log rotation?

@AndrewLiuRM

For yb-tserver/yb-master the log rotation size is controlled by the --max_log_size gflag.

--max_log_size=256 will limit each file to 256MB.
The glog default size is 1.8GB if someone is not passing this argument.

YSQL (we also have the additional postgres.log) has daily and size based log rotation for postgres*.log files - i.e. a new log file will be created per day (or after 10 MB size). However, there is no purging of older log files.

While log purging is only available in Yugabyte Platform.

Got it! Thank you so much!

Hi, I was looking at the docs for yb-master/yb-tserver. I could not find these flags anymore. Are they still there or they are deprecated? Thank you!

It’s here. https://docs.yugabyte.com/latest/troubleshoot/nodes/check-logs/#logs-management

Looks like our docs guy missed them in the references page, will add them shortly.

Hi Andrew — There are many more configuration options than are documented. Since joining Yugabyte recently, I’ve been updating and adding to the configuration options, or flags. Many of the options are intended for support only, but some of the missing log options definitely should be added (and will be shortly).

To see all of the options for YB-Master and YB-TServer, you can always run the online help commands from the Yugabyte home directory:

$ ./bin/yb-master --help

or

$ ./bin/yb-tserver --help

These online listings are very long, so you might want to pipe them to a text file for easier searching.

I’ll review the non-documented configuration options with engineering to make sure that the useful settings are added to the documentation.

Steve