On Tuesday 09 Aug 2016 at 20:02, Michael Martinez wrote:

> 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?

Hyphens are allowed in hostnames - there are plenty of examples of this in the 
icinga documentation.

However, it looks like your problem is {} vs. [] - what happens if you keep 
the hyphen but change the [] to {} on line 38?


Antony.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to