Re: [Nagios-users] Assigning Services to Hosts/Hostgroups
Marc Powell wrote: On Mar 30, 2009, at 2:21 PM, Chris Pepper wrote: We'd like to assign services to hostgroups or hosts (even host templates would be useful) rather than assigning them in the service. http://nagios.sourceforge.net/docs/3_0/objecttricks.html#service Marc, Thanks! It seems somewhat backwards to me that I cannot specify in the service directly, and this keeps tripping me up. Regards, Chris -- Chris Pepper:http://cbio.mskcc.org/ http://www.extrapepperoni.com/ -- ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net 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
Re: [Nagios-users] Assigning Services to Hosts/Hostgroups
2009/4/3 Chris Pepper pep...@cbio.mskcc.org: Thanks! It seems somewhat backwards to me that I cannot specify in the service directly, and this keeps tripping me up. A service is always uniquely identified by both the host name and the service description. If you keep that in mind, hopefully it will make a little more sense. If you really want to specify your services in your host definitions ... You can create a hostgroup which is going to contain all hosts with the service you want to add. You can create a service associated with that hostgroup (rather than a single host). You could also create a host template which just sets the hostgroup and nothing else. You can then add the service to a host by simply applying that host template to the host. If you call the template something appropriate like hostgroup-service-ftp it should become quite intuitive. You can read up on how to apply mutiple templates to an object at http://nagios.sourceforge.net/docs/3_0/objectinheritance.html hth, Jim -- ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net 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