Skip to content

Commit

Permalink
Set logging_type to syslog on Linux platforms by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Dec 31, 2023
1 parent d260ee5 commit 3ff4681
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
6 changes: 0 additions & 6 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ Data type: `Enum['file', 'syslog', 'eventlog']`

Switch the log target. On Windows `syslog` is ignored, `eventlog` on all other platforms.

Default value: `'file'`

##### <a name="-icinga--agent--logging_level"></a>`logging_level`

Data type: `Icinga::LogLevel`
Expand Down Expand Up @@ -708,8 +706,6 @@ Data type: `Enum['file', 'syslog', 'eventlog']`

Switch the log target. On Windows `syslog` is ignored, `eventlog` on all other platforms.

Default value: `'file'`

##### <a name="-icinga--server--logging_level"></a>`logging_level`

Data type: `Icinga::LogLevel`
Expand Down Expand Up @@ -1831,8 +1827,6 @@ Data type: `Enum['file', 'syslog', 'eventlog']`

Switch the log target. On Windows `syslog` is ignored, `eventlog` on all other platforms.

Default value: `'file'`

##### <a name="-icinga--worker--logging_level"></a>`logging_level`

Data type: `Icinga::LogLevel`
Expand Down
4 changes: 4 additions & 0 deletions data/Linux-kernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ icinga::redis::globals::user: icinga-redis
icinga::redis::globals::group: icinga-redis

icinga::web::apache_cgi_pass_auth: true

icinga::server::logging_type: syslog
icinga::worker::logging_type: syslog
icinga::agent::logging_type: syslog
5 changes: 5 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ icinga::repos::manage_server_monitoring: false
icinga::repos::manage_plugins: false
icinga::repos::manage_extras: false

icinga::server::logging_type: file
icinga::server::logging_level: warning

icinga::worker::logging_type: file
icinga::worker::logging_level: warning

icinga::agent::logging_type: file
icinga::agent::logging_level: warning
2 changes: 1 addition & 1 deletion manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
Stdlib::Host $ca_server,
Hash[String, Hash] $parent_endpoints,
Icinga::LogLevel $logging_level,
Enum['file', 'syslog', 'eventlog'] $logging_type,
String $parent_zone = 'main',
Array[String] $global_zones = [],
Enum['file', 'syslog', 'eventlog'] $logging_type = 'file',
String $zone = 'NodeName',
Boolean $run_web = false,
) {
Expand Down
2 changes: 1 addition & 1 deletion manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
# and add the Icinga user to this group.
#
class icinga::server (
Enum['file', 'syslog', 'eventlog'] $logging_type,
Icinga::LogLevel $logging_level,
Boolean $ca = false,
Boolean $config_server = false,
Expand All @@ -62,7 +63,6 @@
Optional[Icinga::Secret] $web_api_pass = undef,
String $director_api_user = 'director',
Optional[Icinga::Secret] $director_api_pass = undef,
Enum['file', 'syslog', 'eventlog'] $logging_type = 'file',
Boolean $run_web = false,
) {
if empty($colocation_endpoints) {
Expand Down
2 changes: 1 addition & 1 deletion manifests/worker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
Stdlib::Host $ca_server,
String $zone,
Hash[String, Hash] $parent_endpoints,
Enum['file', 'syslog', 'eventlog'] $logging_type,
Icinga::LogLevel $logging_level,
String $parent_zone = 'main',
Hash[String, Hash] $colocation_endpoints = {},
Hash[String, Hash] $workers = {},
Array[String] $global_zones = [],
Enum['file', 'syslog', 'eventlog'] $logging_type = 'file',
Boolean $run_web = false,
) {
# inject parent zone if no parent exists
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'endpoints' => { 'foobar' => { 'host' => '127.0.0.1' } },
},
},
'logging_type' => 'file',
'logging_type' => 'syslog',
},
)
}
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'endpoints' => { 'NodeName' => {}, },
},
},
'logging_type' => 'file',
'logging_type' => 'syslog',
'ticket_salt' => 'supersecret',
},
)
Expand Down Expand Up @@ -107,7 +107,7 @@
},
},
},
'logging_type' => 'file',
'logging_type' => 'syslog',
'ticket_salt' => 'supersecret',
},
)
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'endpoints' => { 'foobar' => { 'host' => '127.0.0.1' } },
},
},
'logging_type' => 'file',
'logging_type' => 'syslog',
},
)
}
Expand Down

0 comments on commit 3ff4681

Please sign in to comment.