Icinga 2 bugfix release 2.2.1 – Support Arrays in Command Arguments

by | Dec 1, 2014

Since we released Icinga 2 2.2.0 right before OSMC 2014, we received quite a lot of feedback and also bug reports – thank you! We’ve fixed quite a few bugs for 2.2.1 and also one rather annoying design bug – others might think of it as a feature.

Arrays in Command Arguments

While the command arguments for CheckCommand objects are a pretty nifty idea, some check plugins require specific parameters: Sometimes with a prepended parameter key, sometimes just multiple values. Most prominent examples are:

./check_disk .... -p '/' -p '/var' -p '/tmp'
./check_nrpe .... -a 'arg1' 'arg2' 'arg3'

This did not work in previous versions, so we came up with a better idea:

  1. Support arrays in runtime macros
  2. Allow to define if the key patameter is repeated (e.g. check_disk) or not (e.g. check_nrpe)

That way you can now define an array of disks and pass that value directly to the disk CheckCommand shipped with Icinga 2 using the disk_partitions custom attribute, as shown in the screenshots below. repeat_key is enabled by default.
icinga2_2.2.1_macros_arrays_config icinga2_2.2.1_macros_arrays_command_log icinga2_2.2.1_macros_arrays_icingaweb2
You can also use this new feature for your own check_icmp command definition too, as shown in the documentation.

Upgrade

Package builds are available soon. While downloading and upgrading to the latest and greatest, make sure to read the Changelog.

Changelog

More details in our milestone.

  • Support arrays in [command argument macros](#command-passing-parameters) #6709
    • Allows to define multiple parameters for [nrpe -a](#plugin-check-command-nrpe), [nscp -l](#plugin-check-command-nscp), [disk -p](#plugin-check-command-disk), [dns -a](#plugin-check-command-dns).
  • Bugfixes
  • Feature #6709: Support for arrays in macros
  • Feature #7463: Update spec file to use yajl-devel
  • Feature #7739: The classicui Apache conf doesn’t support Apache 2.4
  • Feature #7747: Increase default timeout for NRPE checks
  • Feature #7867: Document how arrays in macros work
  • Bug #7173: service icinga2 status gives wrong information when run as unprivileged user
  • Bug #7602: livestatus large amount of submitting unix socket command results in broken pipes
  • Bug #7613: icinga2 checkconfig should fail if group given for command files does not exist
  • Bug #7671: object and template with the same name generate duplicate object error
  • Bug #7708: Built-in commands shouldn’t be run on the master instance in remote command execution mode
  • Bug #7725: Windows wizard uses incorrect CLI command
  • Bug #7726: Windows wizard is missing –zone argument
  • Bug #7730: Restart Icinga – Error Restoring program state from file ‘/var/lib/icinga2/icinga2.state’
  • Bug #7735: 2.2.0 has out-of-date icinga2 man page
  • Bug #7738: Systemd rpm scripts are run in wrong package
  • Bug #7740: /usr/sbin/icinga-prepare-dirs conflicts in the bin and common package
  • Bug #7741: Icinga 2.2 misses the build requirement libyajl-devel for SUSE distributions
  • Bug #7743: Icinga2 node add failed with unhandled exception
  • Bug #7754: Incorrect error message for localhost
  • Bug #7770: Objects created with node update-config can’t be seen in Classic UI
  • Bug #7786: Move the icinga2-prepare-dirs script elsewhere
  • Bug #7806: !in operator returns incorrect result
  • Bug #7828: Verify if master radio box is disabled in the Windows wizard
  • Bug #7847: Wrong information in section “Linux Client Setup Wizard for Remote Monitoring”
  • Bug #7862: Segfault in CA handling
  • Bug #7868: Documentation: Explain how unresolved macros are handled
  • Bug #7890: Wrong permission in run directory after restart
  • Bug #7896: Fix Apache config in the Debian package

You May Also Like…

Releasing Icinga DB v1.2.1

Releasing Icinga DB v1.2.1

Today we are releasing a new version of Icinga DB, version 1.2.1, a maintenance release that addresses HA issues and...

Releasing Icinga Director v1.11.3

Releasing Icinga Director v1.11.3

We are happy to announce the release of Icinga Director version 1.11.3. This release addresses few important bug fixes...

Subscribe to our Newsletter

A monthly digest of the latest Icinga news, releases, articles and community topics.