diff --git a/config.yml.example b/config.yml.example index 40ef95d4..28490967 100644 --- a/config.yml.example +++ b/config.yml.example @@ -1,8 +1,28 @@ +# This is the configuration file for Icinga DB. + database: host: icingadb port: 3306 database: icingadb user: icingadb password: icingadb + redis: address: redis:6380 + +logging: + # Default logging level. Can be set to 'fatal', 'error', 'warning', 'info' or 'debug'. + # If not set, defaults to 'info'. + level: + + # Map of component-logging level pairs to define a different log level than the default value for each component. + options: + database: + redis: + heartbeat: + high-availability: + config-sync: + history-sync: + runtime-updates: + overdue-sync: + dump-signals: diff --git a/doc/03-Configuration.md b/doc/03-Configuration.md index 8b4dd11b..ca21b78a 100644 --- a/doc/03-Configuration.md +++ b/doc/03-Configuration.md @@ -24,3 +24,26 @@ port | **Required.** Database port. database | **Required.** Database database. user | **Required.** Database username. password | **Required.** Database password. + +## Logging Configuration + +Configuration of the logging component used by Icinga DB. + +Option | Description +-------------------------|----------------------------------------------- +level | **Optional.** Specifies the default logging level. Can be set to `fatal`, `error`, `warning`, `info` or `debug`. Defaults to `info`. +options | **Optional.** Map of component name to logging level in order to set a different logging level for each component instead of the default one. See [logging components](#logging-components) for details. + +### Logging Components + +Component | Description +-------------------------|----------------------------------------------- +database | Database connection status and queries. +redis | Redis connection status and queries. +heartbeat | Icinga heartbeats received through Redis. +high-availability | Manages responsibility of Icinga DB instances. +config-sync | Config object synchronization between Redis and MySQL. +history-sync | Synchronization of history entries from Redis to MySQL. +runtime-updates | Runtime updates of config objects after the initial config synchronization. +overdue-sync | Calculation and synchronization of the overdue status of checkables. +dump-signals | Dump signals received from Icinga.