I have a request for active checks support .  Can you help me with this?

Abhinav Grover + CHI NETWORKS + agro...@chinetworks.com
619 S. LaSalle Street, Suite 101 Chicago, IL 60605 + Tel: 312-756-1500 x705 + 
Fax: 312-588-1243

-----Original Message-----
From: icinga-users-requ...@lists.sourceforge.net 
[mailto:icinga-users-requ...@lists.sourceforge.net] 
Sent: Wednesday, May 16, 2012 2:23 PM
To: icinga-users@lists.sourceforge.net
Subject: icinga-users Digest, Vol 37, Issue 15

Send icinga-users mailing list submissions to
        icinga-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/icinga-users
or, via email, send a message with subject or body 'help' to
        icinga-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
        icinga-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of icinga-users digest..."


Today's Topics:

   1. Re: nested hostgroups (Lori Adams)
   2. Re: nested hostgroups (Wolfgang)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 May 2012 17:31:27 +0000
From: Lori Adams <lad...@cloudmark.com>
Subject: Re: [icinga-users] nested hostgroups
To: "icinga-users@lists.sourceforge.net"
        <icinga-users@lists.sourceforge.net>
Message-ID:
        
<7b8980d57b4a2448abb50d827c6995100483d...@exch-mbx901.corp.cloudmark.com>
        
Content-Type: text/plain; charset="us-ascii"

I changed my config slightly to really show what I'm trying to do by putting 
foo2 in groupA.
define hostgroup {
        hostgroup_name  groupA
        }
define hostgroup {
        hostgroup_name  groupB
        }
define host {
        use             generic-host
        host_name       foo
        address         127.0.0.1
        hostgroups      groupA
        }
define host {
        use             generic-host
        host_name       foo2
        address         127.0.0.1
        hostgroups      groupB,groupA
        }

define hostgroup {
        hostgroup_name  groupC
        hostgroup_members       groupA,!groupB
        }

So the end result that I wanted would be that groupC has the members: foo.
My objects.precache file does not show that.

define hostgroup {
        hostgroup_name  groupA
        members foo,foo2
        }

define hostgroup {
        hostgroup_name  groupB
        members foo2
        }

define hostgroup {
        hostgroup_name  groupC
        members foo,foo2
        }

So no, the hostgroup does not contain the members that I expect.

From: Wolfgang [mailto:w...@gmx.net]
Sent: Wednesday, May 16, 2012 10:08 AM
To: icinga-users@lists.sourceforge.net
Subject: Re: [icinga-users] nested hostgroups

Sorry for confusing you.
I just had another look at the lines that scrolled off the screen and I have to 
admit that I have this message too. But I guess that the last lines show no 
errors and the return code (echo $?) is 0 (that was what I was referring to 
when I wrote that I have no errors).
Please run the configuration check using the options -vp which creates a file 
called objects.precache in the var folder and verify that the hostgroup foo 
contains the members you expect.

Am 16.05.2012 17:58, schrieb Lori Adams:
Just saw this.   Interesting that you don't see the issue.  Is there any chance 
of a global config that allows/disallows this?  To me, it's odd how the error 
says it doesn't know of the group, '!hostgroupC', as if the '!' is part of the 
hostgroup name.

Thanks,
-Lori

On May 15, 2012, at 10:36 AM, "Wolfgang" <w...@gmx.net<mailto:w...@gmx.net>> 
wrote:
Am 15.05.2012 18:54, schrieb Lori Adams:
It's not a template and is definitely not empty.

It's pretty easy.  Create two hostgroups with hosts in them.  Then create a 
third hostgroup with hostgroup members where one of them is included, and the 
other excluded.
Notice that the error says "could not find group '!hostgroupC', as if it 
doesn't know how to handle exclusions in the hostgroup_members line.

-Lori

From: Wolfgang [mailto:w...@gmx.net]
Sent: Tuesday, May 15, 2012 9:33 AM
To: 
icinga-users@lists.sourceforge.net<mailto:icinga-users@lists.sourceforge.net>
Subject: Re: [icinga-users] nested hostgroups

Am 15.05.2012 18:09, schrieb Lori Adams:
Icinga 1.4.0

Is it true that I cannot do a hostgroup exclusion while attempting nested 
hostgroups?
define hostgroup {
                hostgroup_name foo
                hostgroup_members hostgroupA,hostgroupB,!hostgroupC
                }

Error: Could not find member group '!hostgroupC' specified in hostgroup

Any chance that this has been corrected in a newer version.  I'm aware that 
1.6.0 is out.

Lori Adams
Director of Operations Architecture
Cloudmark
510 388 8513 (M)

I cannot confirm your problem so please verify that hostgroupC exists (and is 
not a template or maybe an empty hostgroup).

I did create such a setup using Icinga 1.4.0 before writing the other posting 
;-).

Attached a (modified) localhost.cfg containing the following definitions:

define hostgroup{
    hostgroup_name hg1
    members localhost1
}
define hostgroup{
    hostgroup_name hg2
    members localhost2
}
define hostgroup{
    hostgroup_name hg3
    hostgroup_members hg1,!hg2
}

>From what I get that is similar to what you described. Attached an 
>objects.precache containing the following lines:

define hostgroup {
    hostgroup_name    hg1
    members    localhost1
    }

define hostgroup {
    hostgroup_name    hg2
    members    localhost2
    }

define hostgroup {
    hostgroup_name    hg3
    members    localhost1
    }

.../bin/icinga -vp complains about some missing services but there are no 
errors.
<objects.precache>
<localhost.cfg>


-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Wed, 16 May 2012 21:23:09 +0200
From: Wolfgang <w...@gmx.net>
Subject: Re: [icinga-users] nested hostgroups
To: icinga-users@lists.sourceforge.net
Message-ID: <4fb3fe9d.5060...@gmx.net>
Content-Type: text/plain; charset="iso-8859-1"

It seems that the documentation
(http://docs.icinga.org/latest/en/objecttricks.html) doesn't indicate that 
excluding objects is valid for hostgroups.

Try to define a service similar to your groupC:

define service{
      use local-service
      service_description your_service
      hostgroups groupA,!groupB
      ....
}

create objects.precache and check if "your_service" is defined for the hosts in 
the intended hostgroups.


Am 16.05.2012 19:31, schrieb Lori Adams:
>
> I changed my config slightly to really show what I'm trying to do by 
> putting foo2 in groupA.
>
> define hostgroup {
>
>         hostgroup_name  groupA
>
>         }
>
> define hostgroup {
>
>         hostgroup_name  groupB
>
>         }
>
> define host {
>
>         use             generic-host
>
>         host_name       foo
>
>         address         127.0.0.1
>
>         hostgroups      groupA
>
>         }
>
> define host {
>
>         use             generic-host
>
>         host_name       foo2
>
>         address         127.0.0.1
>
>         hostgroups      groupB,groupA
>
>         }
>
> define hostgroup {
>
>         hostgroup_name  groupC
>
>         hostgroup_members       groupA,!groupB
>
>         }
>
> So the end result that I wanted would be that groupC has the members: foo.
>
> My objects.precache file does not show that.
>
> define hostgroup {
>
>         hostgroup_name  groupA
>
>         members foo,foo2
>
>         }
>
> define hostgroup {
>
>         hostgroup_name  groupB
>
>         members foo2
>
>         }
>
> define hostgroup {
>
>         hostgroup_name  groupC
>
>         members foo,foo2
>
>         }
>
> So no, the hostgroup does not contain the members that I expect.
>
>

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

------------------------------

_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users


End of icinga-users Digest, Vol 37, Issue 15
********************************************

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to