Karaf Log

The Karaf log can be viewed using a BPC monitor.

General Information

Karaf logs are written to an OpenSearch index with the alias 'bpc-logs'. A BPC monitor is used to view the data.

Configuration

It is recommended to configure Karaf logging settings via environment variables in the central configuration file bpc.env:

bpc.env
  • Unix-based systems (bpc.env.sh)

  • Windows-based systems (bpc.env.cmd)

# Enable/disable Karaf logging (default: true)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_ENABLED="true"

# Cleanup interval in minutes (default: 60)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_CLEANUPPERIODINMINUTES="60"

# Retention period (default: 7 days ago)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_DELETEENTRIESOLDERTHAN="7 days ago"
:: Enable/disable Karaf logging (default: true)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_ENABLED=true

:: Cleanup interval in minutes (default: 60)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_CLEANUPPERIODINMINUTES=60

:: Retention period (default: 7 days ago)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_DELETEENTRIESOLDERTHAN=7 days ago

It is strongly recommended not to make configuration changes directly in the Karaf configuration files under <BPC-INSTALL-DIR>/karaf/etc/, but to use the central bpc.env file instead. During updates of the BPC or Karaf installation, files in the etc directory may be overwritten or replaced with new default versions. Environment variables defined via bpc.env persist across version upgrades, simplifying automated deployment and maintenance. For more details on syntax and usage, see Overriding Values in etc Files.

Alternatively, you can find the settings in the Karaf configuration file <BPC-INSTALL-DIR>/karaf/etc/de.virtimo.bpc.decanter.appender.opensearch.cfg.

Enable/Disable

By default, Karaf logs are written to the OpenSearch index with the alias 'bpc-logs'. To disable this feature, set the environment variable DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_ENABLED="false" or set enabled = false in the configuration file.

Cleanup

The Karaf logs are written to the OpenSearch index under the alias bpc-logs. To prevent the index from growing indefinitely, old data is periodically deleted. The frequency and retention period can be adjusted via bpc.env (see above) or in the configuration file <BPC-INSTALL-DIR>/karaf/etc/de.virtimo.bpc.decanter.appender.opensearch.cfg (a Core Bundle restart is required afterward).

These are the default settings in the file:

de.virtimo.bpc.decanter.appender.opensearch.cfg
# the index gets cleaned up every n-minutes
cleanupPeriodInMinutes=60

# delete all entries from the index that are older than
deleteEntriesOlderThan=7 days ago

Displaying the Karaf Log

The Karaf logs can be viewed in the administration area; see Karaf Log.

It is also possible to make the Karaf log available as a monitor module in the navigation bar.

Karaf Log View

Keywords: