How to increase the log files retention period for the Spotfire Server in a Kubernetes environment?

How to increase the log files retention period for the Spotfire Server in a Kubernetes environment?

book

Article ID: KB0138026

calendar_today

Updated On:

Products Versions
Spotfire Server 14.0.7
Spotfire Server 14.0.7

Description

In the helm chart for the Spotfire server, there are just a couple of variables configured for logging:

logging:
  # -- Specifies a logForwarderAddress. If left empty, then the default `log-forwarder` is used in the case where `log-forwarder.enabled=true`. Template.
  logForwarderAddress: ""
  # -- The Spotfire Server log-level. Set to `debug`, `trace`, `minimal` or leave empty for info.
  logLevel: ""


If the user needs to provide additional logging variables or increase the retention period of the logs, the configuration cannot be added under this 'logging:' section.


Below is a list of the default values for the logging variables:

  • LOGGING_HTTPREQUESTS_ENABLED- Logs information about each http request. Default: Unset (enabled)
  • LOGGING_LOGLEVEL - Set to debugminimal or trace to adjust the logging level. Defaults to empty value meaning "info" level logging. For more information, see Server and node logging levels.
  • LOGGING_SERVERLOG_SIZEPOLICY - See serverLogSizePolicy in the Log4j2 configuration properties. Default 10MB
  • LOGGING_SERVERLOG_DEFAULTROLLOVER - See serverLogDefaultRollover in the Log4j2 configuration properties. Default 2
  • LOGGING_NONSERVERLOG_SIZEPOLICY - See nonServerLogsSizePolicy in the Log4j2 configuration properties. Default 10MB
  • LOGGING_NONSERVERLOG_DEFAULTROLLOVER - See nonServerLogsDefaultRollover in the Log4j2 configuration properties. Default 2
  • LOGGING_TOMCATLOGS_SIZEPOLICY - See tomcatLogsSizePolicy in the Log4j2 configuration properties. Default 10MB
  • LOGGING_TOMCATLOGS_DEFAULTROLLOVER - See tomcatLogsDefaultRollover in the Log4j2 configuration properties. Default 1d

Resolution

The server chart's extraEnvVars option has to be used to increase the log files' retention period.

The example snippet below can be used as a reference to add logging variables to the values.yaml file of the Spotfire server, which will serve the purpose of increasing the retention period of the logs:

extraEnvVars:
  - name: LOGGING_SERVERLOG_SIZEPOLICY
    value: 30MB
  - name: LOGGING_SERVERLOG_DEFAULTROLLOVER
    value: "15"
  - name: LOGGING_NONSERVERLOG_SIZEPOLICY
    value: 20MB
- name: LOGGING_NONSERVERLOG_DEFAULTROLLOVER
value: "10"


Note: There is a requirement to have the values of all environment variables defined under extraEnvVars as strings. As the values for  LOGGING_SERVERLOG_DEFAULTROLLOVER & LOGGING_NONSERVERLOG_DEFAULTROLLOVER are in numeric format, they should be enclosed in double quotes to represent strings.

Issue/Introduction

This article shares the steps and logging properties that can be used to increase the log files retention period for the Spotfire Server in a cloud AKS environment.

Additional Information

Github: Default values for logging variables:

Github:  Adding additional/custom environment variables to the pods: