On Wed, 16 May 2007, Jesús Oliván wrote:

hi!

I want to add the same host in two or more hostgroups, but when i tried
to restart nagios, it told me that PING service is already defined. Is
there any way to solve it?

Thanks in advance!

Hi Jess,

I have many hosts in multiple hostgroups as well. Like you, I find it convenient to do so for mapping services to hostgroups versus doing so directly to hosts. In my configuration, I have a top-level hostgroup that defines hosts according to their physical location, e.g. a colo or data center. I then have the PING service configured against that top-level hostgroup. For more system/network gear specific service mappings, I define finer-grained hostgroups and map services to them. Here's an example, LNC and SCC are my two data centers:

define service{
        use                             generic-service
        hostgroup_name                  LNC
        service_description             PING
        check_command                   check_ping!5,20%!10,40%
        servicegroups                   LNC
        }

define service{
        use                             generic-service
        hostgroup_name                  SCC
        service_description             PING
        check_command                   check_ping!200,20%!400,40%
        servicegroups                   SCC
        }

define service{
        use                             generic-service
        hostgroup_name                  LNC-linuxservers,SCC-servers
        service_description             LOAD
        check_command                   check_remote_load!5,5,5!10,10,10
        servicegroups                   LNC
        }
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to