Skip to content

Commit

Permalink
Merge pull request #38 from lbetz/add-type-logging-options
Browse files Browse the repository at this point in the history
Add new data type for logging options
  • Loading branch information
lbetz authored Sep 24, 2024
2 parents 889f5c2 + b331f80 commit e17e001
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
24 changes: 11 additions & 13 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Configures IcingaDB

### Data types

* [`IcingaDB::LoggingOptions`](#IcingaDB--LoggingOptions): Logging options data type for the IcingaDB process.
* [`IcingaDB::RetentionOptions`](#IcingaDB--RetentionOptions): Data type for retention options of the connection to
the IcingaDB database.
* [`IcingaDB::DBOptions`](#IcingaDB--DBOptions): Data type for options to connect the IcingaDB database.
Expand Down Expand Up @@ -367,16 +368,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 @@ -750,6 +742,10 @@ Data type: `Stdlib::Absolutepath`

## Data types

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

Logging options data type for the IcingaDB process.

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

Data type for retention options of the connection to
Expand All @@ -763,8 +759,10 @@ Alias of

```puppet
Hash[Enum[
'acknowledgement','comment','downtime',
'flapping','notification','state'
], Integer[1]]
'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 @@ -163,12 +163,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
12 changes: 12 additions & 0 deletions types/loggingoptions.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @summary
# Logging options data type for the IcingaDB process.
#
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 e17e001

Please sign in to comment.