Page 1 of 3

Host Group Monitors

Posted: Wed Feb 20, 2013 12:30 pm
by asmgiadmin
I've used auto discover to identify and import several hundred hosts. From there, I will sort each host into their respective host groups.

I'd like to configure hosts in host-group-a to have the following monitors:
CPU Load
Disk Free Space - All local disks
Total Processes
Zombie Processes

How can I configure monitoring groups for host groups?

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 12:43 pm
by sreinhardt
Do you mean that you would like to create host groups that contain other host groups or that you would like to define service checks for host groups? Both are entirely possible it just depends on what you would like to achieve.

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 12:49 pm
by asmgiadmin
I believe the term I'm looking for is service checks, but I'm still learning what everything is called so please excuse any error.

The current scenario is I've used auto-discover to bring in a few hundred hosts and their respective services. I plan to sort those hosts into groups and then configure NSClient++ / NRPE to monitor CPU Usage, disk space, etc. as mentioned above.

To avoid manually creating services for each host, I'd like to say that all hosts in hostgroup will have CPU Usage, disk space, etc. monitored. Then, future hosts will inherit host group settings as well.

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 1:07 pm
by sreinhardt
Sounds like you will want to create host groups and sort as you would like. Then create service checks and apply to those host groups. Any host within a host group defined under a service check will run that check as specified. You can also do this through templates and use template inheritance if you would like something along the lines of:

Windows template:
check-host-alive
check-wmi for host OS

MS Exchange template:
use Windows template (causes it to inherit previous checks)
check-exchange (not an actual check)

Workstation template:
use windows template
check_nt CPUload (check current load on cpu)

This document will give more detail and some other ideas you can try. http://nagios.sourceforge.net/docs/3_0/ ... tance.html

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 2:24 pm
by asmgiadmin
Any host within a host group defined under a service check will run that check as specified.
In that case, should is it a better practice to only import host names with auto discovery? I allowed auto discovery to import discovered services, so it created individual services for each host.

I'm thinking it better to simply define HTTP as service and assign to host groups containing HTTP servers, rather than having HTTP service for each host.

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 2:39 pm
by abrist
asmgiadmin wrote:

I'm thinking it better to simply define HTTP as service and assign to host groups containing HTTP servers, rather than having HTTP service for each host.
In my opinion, this is one of the better ways to do it. The thing is that sometimes you want to check a deep url or check for a string match, and these specific checks may require their own service. But it is a good practice to reduce the number of actual service definitions wherever possible as it can really help with large monitored environments.

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 2:45 pm
by sreinhardt
I would agree with your thinking that not importing services through auto-discovery would be best in your case. My logic to creating things in your environment would be something similar to:

1) Create host\service groups (or templates if you choose to use them)
3) Create service checks and assign hostgroups to each service as needed.
2) Import hosts with auto-discovery
3) Assign hosts to host groups
4) Create any individual service checks that hosts need.

The other issue with auto-discovery is the somewhat strange naming conventions that come out for various services. Doing things by hand or with other wizards tends to lend a better understanding of what is going on.

Re: Host Group Monitors

Posted: Wed Feb 20, 2013 2:51 pm
by asmgiadmin
thank you both.

Re: Host Group Monitors

Posted: Mon Feb 25, 2013 10:28 am
by asmgiadmin
In theory, applying service checks to host groups seemed efficient and well organized, but thinking of possible scenarios, I'm re-thinking my approach.

Consider host group with SSH service check applied and user calls to have SSH check for server1 in host-group. In this case, is it possible to only disable SSH check on server1, while leaving enabled for remainder of host-group?

If not, it may be better to allow auto-discover to create services for each host, rather than assigning service checks to host groups.

Re: Host Group Monitors

Posted: Mon Feb 25, 2013 11:16 am
by asmgiadmin
Also, this document mentions each individual host should have services defined in .cfg file and advises against applying service checks to host groups - http://assets.nagios.com/downloads/nagi ... gement.pdf

Current scenario: 700 Hosts are imported and sorted into their respective host groups. Each host group has service checks applied. I need to reconfigure by removing service checks from host groups and apply to each individual host.

What is most efficient and accurate way to apply service checks for each host within a host group?