Skip to content

Commit

Permalink
Add new data type for logging options
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Sep 21, 2024
1 parent 54fa582 commit 6c7dcae
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
32 changes: 22 additions & 10 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Configures IcingaDB
* `icingadb::redis::service`: Manage IcingaDB Redis server service
* `icingadb::service`: Manage IcingaDB service

### Data types

* [`IcingaDB::LoggingOptions`](#IcingaDB--LoggingOptions)

## Classes

### <a name="icingadb"></a>`icingadb`
Expand Down Expand Up @@ -371,16 +375,7 @@ Default value: `'20s'`

##### <a name="-icingadb--logging_options"></a>`logging_options`

Data type:

```puppet
Hash[Enum[
'config-sync','database','dump-signals',
'heartbeat','high-availability',
'history-sync','overdue-sync','redis',
'retention','runtime-updates','telemetry'
],Enum['fatal','error','warn','info','debug']]
```
Data type: `IcingaDB::LoggingOptions`

Map of component-logging level pairs to define a different log level than
the default value for each component.
Expand Down Expand Up @@ -759,3 +754,20 @@ Data type: `Stdlib::Absolutepath`



## Data types

### <a name="IcingaDB--LoggingOptions"></a>`IcingaDB::LoggingOptions`

The IcingaDB::LoggingOptions data type.

Alias of

```puppet
Hash[Enum[
'config-sync','database','dump-signals',
'heartbeat','high-availability',
'history-sync','overdue-sync','redis',
'retention','runtime-updates','telemetry'
], Enum['fatal','error','warn','info','debug']]
```

7 changes: 1 addition & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,7 @@
Optional[Stdlib::Absolutepath] $redis_tls_cacert_file = undef,
Enum['fatal','error','warn','info','debug'] $logging_level = 'info',
Optional[Enum['console','systemd-journald']] $logging_output = undef,
Hash[Enum[
'config-sync','database','dump-signals',
'heartbeat','high-availability',
'history-sync','overdue-sync','redis',
'retention','runtime-updates','telemetry'
],Enum['fatal','error','warn','info','debug']] $logging_options = {},
IcingaDB::LoggingOptions $logging_options = {},
Pattern[/^\d+\.?\d*[d|h|m|s]?$/] $logging_interval = '20s',
Optional[Integer[1]] $retention_history_data = undef,
Optional[Integer[1]] $retention_sla_data = undef,
Expand Down
9 changes: 9 additions & 0 deletions types/loggingoptions.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type IcingaDB::LoggingOptions = Hash[
Enum[
'config-sync','database','dump-signals',
'heartbeat','high-availability',
'history-sync','overdue-sync','redis',
'retention','runtime-updates','telemetry'
],
Enum['fatal','error','warn','info','debug']
]

0 comments on commit 6c7dcae

Please sign in to comment.