Closed icinga-migration closed 9 years ago
Updated by mfriedrich on 2015-07-09 08:32:51 +00:00
https://lists.icinga.org/pipermail/icinga-users/2015-June/009733.html
Updated by mfriedrich on 2015-07-09 08:33:15 +00:00
Probably a bug in the macro() function.
Updated by gbeutner on 2015-07-13 06:09:26 +00:00
Updated by gbeutner on 2015-07-13 06:16:48 +00:00
The underlying problem is that the macro code resolves your macro like this:
There's already a special case for Array objects and I guess it would make sense to expand that to include all other scalar non-string values (i.e. numbers and booleans).
Updated by Anonymous on 2015-07-13 06:26:33 +00:00
Applied in changeset 8dedd47b89639959f40d7544877bf22a052cd4af.
Updated by gbeutner on 2015-07-13 06:26:57 +00:00
Updated by mfriedrich on 2015-07-15 08:32:11 +00:00
Updated by roji on 2015-07-16 08:30:03 +00:00
Thanks, I can confirm the problem is gone in 2.3.7!
This issue has been migrated from Redmine: https://dev.icinga.com/issues/9584
Created by roji on 2015-07-08 10:58:38 +00:00
Assignee: gbeutner Status: Resolved (closed on 2015-07-13 06:26:33 +00:00) Target Version: 2.3.7 Last Update: 2015-07-16 08:30:03 +00:00 (in Redmine)
(originally posted as a question to icinga-users, received response for Michael Friedrich)
My check looks like this:
This check generates the error "Peer authentication failed for user "mon"", which after some digging is the result of the lack of a -H (host) parameter to check_postgres.pl. Note that in /usr/share/icinga2/include/plugins-contrib.d/databases.conf the CheckCommand object includes "vars.postgres_unixsocket = false", and the -H argument has "set_if = {{ macro("$postgres_unixsocket$") == false }}". Since I haven't defined postgres_unixsocket to be true (or anything else) the expectation is for the -H to be passed, but this doesn't happen.
This seems to be because macro("$postgres_unixsocket$") always returns a String although $postgres_unixsocket$ is a Boolean.
Changesets
2015-07-13 06:25:19 +00:00 by (unknown) 8dedd47b89639959f40d7544877bf22a052cd4af
2015-07-13 06:26:17 +00:00 by (unknown) c2da4869a61620ad1636d405cda54c57cf4c7368