Multiple hosts/services in services.cfg?

Mark D. Nagel mnagel at willingminds.com
Thu Dec 4 18:09:45 CET 2003


Quanah Gibson-Mount wrote:

>
>
> --On Thursday, December 04, 2003 10:33 AM +1100 Patrick Webster
> <pwebster at ausgeo.com.au> wrote:
>
>>> Yes, it is undocumented, but you can use:
>>> hostgroup_name  <groupname>
>>
>>
>> Ok thanks guys.
>>
>> Do you know if this will work (multiple checks in one) in the service
>> definition? I tried it once without success.
>>
>>         check_command                   check-nt-cpuload
>>         check_command                   check-nt-memuse
>>         check_command                   check-nt-disk
>>         check_command                   check-nt-uptime
>>
>> Perhaps you can do;
>>       check_command               check1,check2,check3
>>
>> ??
>>
>> Thanks again.
>
>
> I don't believe so.  I set up a service template, and then just have:
>
> define service {
> use              ldap-generic-service
> service_description LDAP bind check
> check_command    check_ldap
> }
>
> etc... That way I only have to change the template
> (ldap-generic-service).
>
>> From what I can tell, *each* check needs its own service description 
>
> (otherwise you can't set up service dependencies).
>
One really nice function of NagMIN we've found is that you can define
service groups (based on service templates) and attach one or more to
each host.  Behind the scenes, NagMIN uses this to generate the
corresponding Nagios configuration, but from my point of view, I get
exactly what I want -- for every host, I just check off the service
groups that apply.  This works well if the host contact is the same as
the service contact for all services and the service is generic (not,
for example, a specific HTTP content check).  If this isn't true, you
need to actually define service entries manually with the appropriate
contacts.

Mark

-- 
Mark D. Nagel, CCIE #3177 <mnagel at willingminds.com>
Principal Consultant, Willing Minds LLC
tel/fax: 949-623-9853, web: http://www.willingminds.com/




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list