Icingadb service fails with ReadString error

I’m testing IcingaDB on Debian buster. After starting icingadb the service fails with the following message:

May 05 19:10:54 ewr-icinga2 icingadb[31355]: time="2020-05-05T19:10:54Z" level=fatal msg="checkcommandargument.CheckCommandArgument.SetIf: ReadString: expects \" or n, but found t, error found in #10 byte of ...|\"set_if\":true}|..., bigger context ...|39a3ee5e6b4b0d3255bfef95601890afd80709\",\"set_if\":true}|..."

I’m using the following versions:

# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.0-rc1-1)

Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Debian GNU/Linux
  Platform version: 10 (buster)
  Kernel: Linux
  Kernel version: 4.19.0-6-amd64
  Architecture: x86_64

Build information:
  Compiler: GNU 8.3.0
  Build host: runner-LTrJQZ9N-project-298-concurrent-0
  OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019
# icingadb --version
Icinga DB version: v1.0.0-rc1
# mariadb --version
mariadb  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

I have a CheckCommand defined with

    arguments = {
        "--quiet" = {
            set_if = true

I removed it for now, because I don’t use it.


I reproduced this on Ubuntu 18.

But, to be honest, I do not really understand the purpose

arguments = {
"--quiet" = {
    set_if = true

From the documentation:
By default you can evaluate runtime macros for their existence. If the result is not an empty string, the command parameter is passed.

If you only want to skip the argument, you could rather use

"--quiet" = {
     value = "--quiet"
     skip_key = true

And add set_if with the required conditions.

Regardless of this, this error should be caught.
Icinga2 doesn’t complain and the icingadb-service fails.


This was a leftover from the beginning of Icinga Director testing (we use Icinga 2 since the first beta version and we also moved the config peu a peu to the Director).

I created issue https://github.com/Icinga/icingadb/issues/182 for this.