diff --git a/CHANGELOG.md b/CHANGELOG.md index b411d027..38d38b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## [v3.6.1](https://github.com/icinga/puppet-icinga2/tree/v3.6.1) (2023-04-02) +[Full Changelog](https://github.com/icinga/puppet-icinga2/compare/v3.6.0...v3.6.1) + +**Fixed bugs:** + +- make object-collection deterministic in icinga2::query\_objects [\#725](https://github.com/Icinga/puppet-icinga2/pull/725) ([sircubbi](https://github.com/sircubbi)) +- Bugfix: don't fail if more than one environment is given in query\_objects and allow to collect from all environments [\#724](https://github.com/Icinga/puppet-icinga2/pull/724) ([sircubbi](https://github.com/sircubbi)) + ## [v3.6.0](https://github.com/icinga/puppet-icinga2/tree/v3.6.0) (2023-03-22) [Full Changelog](https://github.com/icinga/puppet-icinga2/compare/v3.5.3...v3.6.0) diff --git a/REFERENCE.md b/REFERENCE.md index 0ccce901..e7bf7bde 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -46,7 +46,7 @@ start on boot and will be restarted if stopped. #### Public Defined types -* [`icinga2::config::fragment`](#icinga2configfragment): Set a code fragment in a target configuration file. +* [`icinga2::config::fragment`](#icinga2configfragment): Set a code fragment in a target configuration file. It's not possible to add a fragment to an object. * [`icinga2::object::apiuser`](#icinga2objectapiuser): Manage Icinga 2 ApiUser objects. * [`icinga2::object::checkcommand`](#icinga2objectcheckcommand): Manage Icinga 2 Host objects. * [`icinga2::object::checkresultreader`](#icinga2objectcheckresultreader): Manage Icinga 2 CheckResultReader objects. @@ -2748,7 +2748,7 @@ Default value: `$facts['networking']['fqdn']` Data type: `Array[String]` -limits the response to objects of these environments +limits the response to objects of these environments if set, all environments if list is empty Default value: `[$environment]` @@ -2756,11 +2756,11 @@ Default value: `[$environment]` ### `icinga2::config::fragment` -Set a code fragment in a target configuration file. +Set a code fragment in a target configuration file. It's not possible to add a fragment to an object. #### Examples -##### To create a custom configuration add content to a specified target at the position you set in the order parameter. You can use also templates to add content. +##### To create a custom configuration add content to a specified target at the position you set in the order parameter. ```puppet include ::icinga2 @@ -2769,21 +2769,27 @@ icinga2::object::service { 'load': display_name => 'Load', apply => true, check_command => 'load', + vars => { + load_wload1 => 'dynamic_threshold(backup, 20, 5)', + load_cload1 => 'dynamic_threshold(backup, 40, 10)', + }, assign => ['vars.os == Linux'], - target => '/etc/icinga2/conf.d/service_load.conf', + target => '/etc/icinga2/example.d/services.conf', order => 30, } icinga2::config::fragment { 'load-function': - target => '/etc/icinga2/conf.d/service_load.conf', - order => 10, - content => 'vars.load_wload1 = {{ - if (get_time_period("backup").is_inside) { - return 20 + target => '/etc/icinga2/example.d/services.conf', + order => 10, + content => "globals.dynamic_threshold = function(timeperiod, ivalue, ovalue) { + return function() use (timeperiod, ivalue, ovalue) { + if (get_time_period(timeperiod).is_inside) { + return ivalue } else { - return 5 + return ovalue } - }}', + } +}\n", } ``` diff --git a/metadata.json b/metadata.json index 11a3fce0..1113cc8a 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "icinga-icinga2", - "version": "3.6.0", + "version": "3.6.1", "author": "Icinga Development Team", "summary": "Icinga 2 Puppet Module", "license": "Apache-2.0",