Karaf Log

The Karaf log can be displayed 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 display the data.

Configuration

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

BPC.env
  • Unix systems (bpc.env.sh)

  • Windows systems (BPC.env.cmd)

# Karaf Logging de-/aktivieren (Standard: true)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_ENABLED="true"

# Bereinigungsintervall in Minuten (Standard: 60)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_CLEANUPPERIODINMINUTES="60"

# Aufbewahrungsdauer (Standard: 7 days ago)
export DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_DELETEENTRIESOLDERTHAN="7 days ago"
:: Karaf Logging de-/aktivieren (Standard: true)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_ENABLED=true

:: Bereinigungsintervall in Minuten (Standard: 60)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_CLEANUPPERIODINMINUTES=60

:: Aufbewahrungsdauer (Standard: 7 days ago)
SET DE_VIRTIMO_BPC_DECANTER_APPENDER_OPENSEARCH_DELETEENTRIESOLDERTHAN=7 days ago

It is strongly recommended that you do not make configuration changes directly in the Karaf configuration files at <BPC-INSTALL-DIR>/karaf/etc/, but rather use the central bpc.envfile. When updating the BPC or Karaf installation, files in the etc directory may be overwritten or replaced by new default versions. Environment variables defined via bpc.env are preserved during version changes and facilitate automated deployment and maintenance. For more details on the syntax and functionality, 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 define the parameter enabled = false in the configuration file.

Cleanup

The Karaf logs are written to the OpenSearch index with the alias bpc-logs. To prevent this index from growing indefinitely, old data is periodically deleted. The frequency and retention period can be adjusted via the 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: