Hi Jean,

 

Let me try to explain again it in "old fashioned" Nagios style. I setup a host 
in hosts.cfg where I tell the host to use a template configuration from 
templates.cfg. Within the template there is a hostgroup defined, so all hosts 
that are assigned to that template should be in that hostgroup.

Additionally I used the hostgroups.cfg file and created a different hostgroup, 
where I added the host already defined with the template.

This causes to have two different groups with the same hosts and I am not sure 
if that is really wanted.

 

Simple example:  

 

templates.cfg

 

define host{

                name                                                      
linux-server        

                use                                                          
generic-host       

                check_period                                      24x7          
             

                check_interval                                   5              
                

                retry_interval                                     5            
                  

                max_check_attempts                     2                        
      

                check_command                              check_dummy!0        
       

                notification_period                          24x7

                notification_interval                        1                  
            

                notification_options                        d,u,r               
        

                contact_groups                                 admins           
       

                register                                                 0      
                        

                hostgroups                                          
ServeursRedHat

                }

 

 

hosts.cfg :

 

define host{

                use                                                          
linux-server

                contact_groups                                 admins

                host_name                                          srv-ipvs-1

                realm                                                      EMEA

                alias                                                         
srv-ipvs-1

                address                                                 
192.168.0.1

                check_interval                                   1

                check_command                               check_host_alive

        }

 

hostgroups.cfg:

 

define hostgroup{

                hostgroup_name                              sql_server          
 

                alias                                                         
SQL Servers         

                members                                              srv-ipvs-1 
    

                realm                                                      EMEA

        }

 

This will end up Thruk displaying two hostgroups (ServeursRedHat and 
sql_server) with the srv-ipvs-1 hosts assigned to each hostgroup.

 

So I thought if one group should be overwritten, so just one is displayed, or 
if that is a wanted feature.

 

Michael

 

 

 

 

 

 

Von: nap [mailto:napar...@gmail.com] 
Gesendet: Montag, 28. März 2011 16:43
An: shinken-devel@lists.sourceforge.net
Betreff: Re: [Shinken-devel] Duplicate creation of hostgroups when defined in 
template and hostgroup file

 

 

On Mon, Mar 28, 2011 at 3:59 PM, Hienz, Michael <mhi...@lear.com> wrote:

Hi all,

Hi,
 

         

        when I use a template where a hostgroup is already defined and then 
also assign a hostgroup_name which is different from the one in the template in 
the hostgroup.cfg, I can see two entries through the Thruk interface, with the 
same host being in the two different hostgroups. Not sure if that is really a 
feature, but from my point of view it seems to be a bug, because generally, the 
"last" configuration options of the host, service, etc.  usually overwrites the 
top level or template confs.

Yes, the template should over right the host one, unless this value start with 
a '+' (additive inheritance). But here it's another problem if I can understand 
: you set a hostgroup in the host configuration, and in another hostgroup, you 
set this host as a member is that right?

If I'm not wrong such configuration say "add to both" in Nagios, and it sound 
logical to me (you got 2 way of adding into hostgroups, I don't think one is a 
preferred way to the other).

Is it a configuration inherited from a Nagios ?

Thanks,


Jean
 

         

        Regards

        Michael

         

         

**********************
** LEGAL DISCLAIMER **
**********************
 
This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

        
        
------------------------------------------------------------------------------
        Enable your software for Intel(R) Active Management Technology to meet 
the
        growing manageability and security demands of your customers. Businesses
        are taking advantage of Intel(R) vPro (TM) technology - will your 
software
        be a part of the solution? Download the Intel(R) Manageability Checker
        today! http://p.sf.net/sfu/intel-dev2devmar
        _______________________________________________
        Shinken-devel mailing list
        Shinken-devel@lists.sourceforge.net
        https://lists.sourceforge.net/lists/listinfo/shinken-devel

 


**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to