hostgroups in service definitions

Massey, Craig craig.massey at chh.co.nz
Wed Nov 27 19:14:00 CET 2002


One of my services using a hostgroup

define service{
        use                             base-service
        service_description             EXCHANGE_SA
        hostgroup_name                  nt_client_servers
        max_check_attempts              2
        normal_check_interval           15
        retry_check_interval            1
        notification_interval           120
        notification_options            c
        contact_groups                  NT-Admin
        check_command                   check_nt_service!msexchangesa
        }

Try
http://YOUR_NAGIOS_SERVER/nagios/docs/templatetricks.html
for the official explanation of what you're going to need if you have a
large installation.

-----Original Message-----
From: Rasmus Plewe [mailto:rplewe at ess.nec.de]
Sent: Thursday, November 28, 2002 6:25 AM
To: Nagios users list
Subject: [Nagios-users] hostgroups in service definitions


Hello,

I'm trying to set up Nagios for an (in the end) fairly large and
complex network. I haven't used Nagios/Netsaint before, but with the
documentation and the FAQ I got a pretty good start, at least for the
not large and complex test bed. 

My problem:
My logical thinking tells me that in a "define service{}" I should be
able to insert a hostgroup, with the result that this service would be
defined on all hosts in the hostgroup (as I have a couple of basically
identical hosts). This does not seem to work. 

What I have done:
- I used 
  host_name mygroup 
  in the service definition. Result when running nagios -v:
  Error: Host 'my_group' specified in service 'SMTP' not defined anywhere!
- I used 
  host_group my_group
  in the service definition. Result when running nagios -v:
  Error: Could not add object property in file '[...]/services.cfg' on line
x.
- I used 
  host_name host1,host2,host3
  in the service definition. This seems to work. 

What more did I do:
- I read the documentation regarding service definition (again) and
  looked for other places in the documentation that could be of help.
- I read and searched the FAQ.
- I tried to search the mailing list archive. Unfortunately the search
  funktion was either stalling or time out-ing, more or less.

I'm sure it must be some tiny overseeing on my side, as I would expect
this to be in the FAQ if it was really neccessary to list all
computers seperately - what would be the point of hostgroups then, and
it would be quite error prone when adding/deleting hosts. 


Regards,
         Rasmus


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users

DISCLAIMER:  This electronic message together with any attachments is 
confidential.  If you are not the intended recipient, do not copy, disclose or 
use the contents in any way.  Please also advise us by return e-mail that you 
have received the message and then please destroy.  Carter Holt Harvey is not 
responsible for any changes made to this message and / or any attachments after 
sending by Carter Holt Harvey.  We use virus scanning software but exclude all 
liability for viruses or anything similar in this email or any attachment.


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en




More information about the Users mailing list