Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new data type for logging options #38

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']
]
Loading