Hi Stephen,
object HostGroup works.
apply HostGroup does not:

critical/config: Error: 'apply' cannot be used with type 'HostGroup'

On Wed, Oct 26, 2016 at 12:10 PM, Stephan Tesch <step...@tesch.cx> wrote:
> Am 26.10.2016 um 19:54 schrieb Michael Martinez:
>
> Hi Michael,
>
>> I'm kinda stumped on this one. I'm defining a HostGroup and then
>> trying to access it, but it's not working.
>>
>> object HostGroup "atlantic101" {
>>   display_name = "atlantic101"
>>   assign where host.vars.range == "atlantic101"
>> }
>
> Are you sure it's "object HostGroup" and not "apply HostGroup"?
>
>> hg1 = get_host_group("atlantic101")
>>
>> if ( hg1) {
>> log("MMM able to retrieve hostgroup")
>> } else {
>> log("MMM unable to retrieve hostgroup")
>> }
>>
>> for (hg in get_objects(HostGroup)) {
>> log("MMM inside for loop")
>> }
>>
>>
>> What shows up in the logs are "MMM unable to retrieve hostgroup".
>> The log statement inside the for loop does not happen.
>> So, it seems that get_host_group and get_objects are not working? I'm
>> not sure what's going on.
> Best regards,
> Stephan
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users



-- 
---
Michael Martinez
http://www.michael--martinez.com
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to