Skip to content

Configuration

Overview

Apart from its web configuration capabilities, the local configuration is stored in /etc/icingaweb2 by default (depending on your configuration setup).

File/Directory Description
config.ini General configuration (global, logging, themes, etc.)
resources.ini Global resources (Icinga Web 2 database for preferences and authentication, Icinga 2 IDO database)
roles.ini User specific roles (e.g. administrators) and permissions
authentication.ini Authentication backends (e.g. database)
enabledModules Symlinks to enabled modules
modules Directory for module specific configuration

Comments in .ini files follow the (de facto) standard in the form of a semicolon (;) at the beginning of a (each) line.

General Configuration

Navigate into Configuration > Application > General .

This configuration is stored in the config.ini file in /etc/icingaweb2.

Global Configuration

Option Description
show_stacktraces Optional. Set to 1 to show debug stacktraces. Defaults to 1.
show_application_state_messages Optional. Set to 1 to show application state messages. Defaults to 1.
module_path Optional. Specifies the directories where modules can be installed. Multiple directories must be separated with the platform path separator (: on Unix-like systems).
config_resource Required. Specify a defined resource name.

Example for storing the user preferences in the database resource icingaweb_db:

[global]
show_stacktraces = "1"
show_application_state_messages = "1"
config_resource = "icingaweb_db"
module_path = "/usr/share/icingaweb2/modules"

Logging Configuration

Option Description
log Optional. Specifies the logging type. Can be set to syslog, file, php (web server’s error log) or none.
level Optional. Specifies the logging level. Can be set to ERROR, WARNING, INFO or DEBUG.
file Optional. Specifies the log file path if log is set to file.
application Optional. Specifies the application name if log is set to syslog or php. Defaults to icingaweb2.
facility Optional. Specifies the syslog facility if log is set to syslog. Can be set to user, local0 to local7. Defaults to user.

Example for more verbose debug logging into a file:

[logging]
log = "file"
level = "DEBUG"
file = "/usr/share/icingaweb2/log/icingaweb2.log"

Theme Configuration

Option Description
default Optional. Choose the default theme. Can be set to Icinga, high-contrast, Winter, colorblind or your own installed theme. Defaults to Icinga. Note that this setting is case-sensitive because it refers to the filename of the theme.
disabled Optional. Set this to 1 if users should not be allowed to change their theme. Defaults to 0.
default_mode Optional. Choose the default theme mode. Can be set to system, light or none for the dark theme mode. Defaults to none.

Example:

[themes]
disabled = "1"
default = "Icinga"
default_mode = "light"

Authentication Configuration

Option Description
default_domain Optional. Domain assumed when users log in without specifying a domain. It must match an LDAP backend’s configured domain or the domain suffix stored in another backend’s usernames, e.g. icinga.com.

Example:

[authentication]
default_domain = "icinga.com"
Option Description
domain Optional. Domain attribute for cookies, e.g. .example.com.
path Optional. Path attribute for cookies, e.g. /icingaweb2/. Defaults to the Icinga Web base URL.
secure Optional. Set to 1 to send cookies only over HTTPS. Defaults to the current request scheme.

Example:

[cookie]
domain = ".example.com"
path = "/icingaweb2/"
secure = "1"

Security Configuration

Navigate into Configuration > Application > Security.

This configuration is stored in the config.ini file in /etc/icingaweb2.

Password Policy Configuration

Option Description
password_policy Optional. Canonical name of the password policy to enforce. Defaults to any (None).

Example:

[security]
password_policy = "common"

Content Security Policy Configuration

Option Description
use_strict_csp Optional. Set this to 1 to enable strict Content Security Policy. Defaults to 0.
use_custom_csp Optional. Set this to 1 to use the user-defined Content Security Policy. Defaults to 0.
custom_csp Optional. Specifies the user defined Content Security Policy. Overrides the automatically generated one. Only used if use_custom_csp is set to 1.
csp_enable_modules Optional. Specifies if modules should be included in the generated Content Security Policy. Defaults to 0.
csp_enable_dashboards Optional. Specifies if dashboards should be included in the generated Content Security Policy. Defaults to 0.
csp_enable_navigation Optional. Specifies if navigation menu items should be included in the generated Content Security Policy. Defaults to 0.

When strict CSP is enabled through the Security page for the first time, the csp_enable_* options are enabled by default.

Example:

[security]
use_strict_csp = "1"
use_custom_csp = "0"
custom_csp = "frame-src https://example.com"
csp_enable_modules = "1"
csp_enable_dashboards = "1"
csp_enable_navigation = "1"