On Thu, 4 Sep 2014, Michael Friedrich wrote:

$ service icinga2 checkconfig
...............
Config error: Invalid value for attribute: Object 'Disk Time S:' (Type: 'Service') at /etc/icinga2/zones.d/master/hosts/windows/winserver:32 -> Attribute 'enable_notifications'
[2014-09-03 23:38:59 +0200] critical/config: 1 errors, 0 warnings

"false" is a string in your configuration snippet. You would want to use

enable_notifications = false

as boolean value as the error message implies with "Invalid value for attribute".

   I am a big proponent of simplicity when it comes to error messages,
mainly because the number of things that can cause them is so large.

   In this case, where clearly the correct data-type for a variable is
known, and the provided data-type has been detected, I would advocate
for adding verbiage to the error stating something to the effect of,
"Expected boolean, got string."  The existing error, whilst technically
accurate, is very verbose, leading to misinterpretation, and at the
same time incomplete by not stating what might -- or might not -- be
obvious.

   "If in doubt, call it out."

   Cheers!

+------------------------------------------------+---------------------+
| Carl Richard Friend (UNIX Sysadmin)            | West Boylston       |
| Minicomputer Collector / Enthusiast            | Massachusetts, USA  |
| mailto:[email protected]                        +---------------------+
| http://users.rcn.com/crfriend/museum           | ICBM: 42:22N 71:47W |
+------------------------------------------------+---------------------+
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to