How Fluentd-based NetBackup Snapshot Manager for Data Center logging works
When you install or upgrade NetBackup Snapshot Manager for Data Center, the following changes occur on the NetBackup Snapshot Manager for Data Center host:
A new container service named
flexsnap-fluentdis started on the NetBackup Snapshot Manager for Data Center host. This service is started before all the other NetBackup Snapshot Manager for Data Center container services. Theflexsnap-fluentdservice serves as thefluentddaemon on the host.All the NetBackup Snapshot Manager for Data Center container services are then started with
fluentdas the Docker logging driver.A
fluentdconfiguration file is created at/cloudpoint/fluent/fluent.conf.This file contains the output plug-in definitions that are used to determine where the NetBackup Snapshot Manager for Data Center logs are redirected for consumption.
Once all the infrastructure components are ready, each of the NetBackup Snapshot Manager for Data Center services begin to send their respective log messages to the configured Docker fluentd logging driver. The fluentd daemon then redirects the structured logs to the output plug-ins configured in the fluentd configuration file. These logs are then sent to the /cloudpoint/logs/flexsnap.log file on the NetBackup Snapshot Manager for Data Center host.
Note that the flexsnap.log file gets rotated after the file size reaches a maximum of 100 MB. A total of 30 generations (rotated files) of the flexsnap.log file are maintained. These conditions are applicable because of the new log file rotate (log-rotate-age) and log size (log-rotate-size) command options that are introduced in the fluentd command.
Steps to configure log file rotate and log size command options
- In
/cloudpoint/flexsnap.conffile, enter thelog_rotate_ageandlog_rotate_sizevalues under logging section and then restart theflexsnap-fluentdcontainer for changes to take effect.Sample
flexsnap.conffile:[logging] log_rotate_age = 7 log_rotate_size = 20000 ```
log_rotate_age: Specifies the generations to keep rotated log files (the total number of files that can be accumulated before rotation), the default value is 30.
log_rotate_size: Specifies the log file size (in bytes) after which a single log file will be rotated, the default value is 100000000 bytes.
- After changing the
flexsnap.conffile, restart theflexsnap-fluentdcontainer:For docker environment: # sudo docker restart flexsnap-fluentd
For podman environment:
# sudo podman stop flexsnap-fluentd # sudo podman start flexsnap-fluentd