Beer Garden Configuration

In this guide, we will go over the configuration options in Beer Garden and how they affect the application. We will talk about the configuration at a high level, but we assume you have installed Beer Garden somehow.

If you would like to jump straight to the definitions of config.yaml, please redirect to Config User Manual

Configuration Files

There are 3 configuration files that come installed with Beer Garden. If you installed an RPM, you will find these in /opt/beer-garden/conf.

The default names are:

  • config.yaml

  • app-logging.yaml

  • plugin-logging.yaml

To configure Child Garden connections, you must create a config file per child. For RPM installs, the default location is folder /opt/beer-garden/conf/children.

Beer Garden Configuration

If you do not have a config.yaml file, then you can generate one via:

generate_config -c config.yaml

If you already have a config.yaml file, then you can upgrade it to the latest version via:

migrate_config -c config.yaml

To see all of the definitions of config.yaml, please checkout our Config User Manual

Beer Garden Logging Configuration

As of Beer Garden 3.0.0, there is a new configuration file for plugin logging configurations. If this file is not included, a logging configuration is inferred from the logging configuration defined in config.yaml. This logging configuration specifies how you would like plugins to log. A valid logging configuration can be found in /opt/beer-garden/conf/app-logging.yaml. Let’s examine what is allowed to go into this configuration.

Level

You may specify a default level that you would like all plugins to log at. This can be overwritten by handlers, or loggers entries. The supported levels are:

  • DEBUG

  • INFO

  • WARN

  • ERROR

Handlers

The handlers section is a dictionary which may contain one of the following keys:

  • stdout

  • file

  • logstash

Plugin Logging Configuration

As of Beer Garden 3.0.0, there is a new configuration file for plugin logging configurations. If this file is not included, a logging configuration is inferred from the logging configuration defined in config.yaml. This logging configuration specifies how you would like plugins to log. A valid logging configuration can be found in /opt/beer-garden/conf/plugin-logging.yaml. Let’s examine what is allowed to go into this configuration.

Level

You may specify a default level that you would like all plugins to log at. This can be overwritten by handlers, or loggers entries. The supported levels are:

  • DEBUG

  • INFO

  • WARN

  • ERROR

Handlers

The handlers section is a dictionary which may contain one of the following keys:

  • stdout

  • file

  • logstash

Each of these keys can have their own configuration and can be overwritten in the loggers section. Other handlers are not yet supported.

Beer Garden Plugin Logger Values

Beer Garden provides additional variables that can be injected into the handlers. The primary use case we provide is creating custom logs in a common directory for all plugins.

  • namespace

  • system_name

  • system_version

  • instance_name

plugin-logging.yaml
handlers:
  file:
    backupCount: 5
    class: "logging.handlers.RotatingFileHandler"
    encoding: utf8
    formatter: default
    level: INFO
    maxBytes: 10485760
    filename: "logs/%(instance_name)s.log"

Formatters

The formatters section is also a dictionary. Its keys must match up with a specific handler name or the name default. Here you can setup a special formatter for each of the individual handlers. The handlers should specify which formatter they would like to use.

Beer Garden Children Configuration

If you would like to jump straight to the definitions of Child Configurations, please redirect to Child Config User Manual

Child configurations files have a specific naming convention for the file. The file should be named as <garden name>.yaml. The filename prior to .yaml will be stored as the Garden Name in the database. At file reload, all values will be overwritten.