Am 04.09.2014 12:32, schrieb Carl R. Friend:
   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."

Create an issue and fix it. I doubt that this is an easy one though.

Kind regards,
Michael

-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to