[icinga-users] Is hyphen not allowed in variable name?

Thomas Gelf thomas.gelf at netways.de
Tue Aug 9 22:21:53 CEST 2016


Hyphen is allowed in a variable name, but not written that way. Please
use vars.elb["discovery-premium"] instead and you should be fine.

Am 09.08.2016 um 21:02 schrieb Michael Martinez:
> critical/config: Error: Expression cannot be assigned to.
> Location: in /media/ephemeral0/icinga2/etc/icinga2/conf.d/hosts/icinga_host.conf:
> 38:1-38:74
> /media/ephemeral0/icinga2/etc/icinga2/conf.d/hosts/icinga_host.conf(36):
> all_hostgroups += { "discovery101" = 1 }
> /media/ephemeral0/icinga2/etc/icinga2/conf.d/hosts/icinga_host.conf(37):
> /media/ephemeral0/icinga2/etc/icinga2/conf.d/hosts/icinga_host.conf(38):
> vars.elb.discovery-premium += [ "ec2xxxx.compute-1.amazonaws.com" ]
>
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> It works if I remove the hyphen (-) from the variable name. Are
> hyphens not allowed?
>

-- 
Thomas Gelf
Principal Consultant

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | thomas.gelf at netways.de

** OSBConf 2016 - September - osbconf.org **
** OSMC 2016 - November - netways.de/osmc **


More information about the icinga-users mailing list