Host Group Monitors

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Host Group Monitors

Post 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?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Host Group Monitors

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Host Group Monitors

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Host Group Monitors

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Host Group Monitors

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post by asmgiadmin »

thank you both.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post 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.
asmgiadmin
Posts: 125
Joined: Tue Feb 12, 2013 5:00 pm

Re: Host Group Monitors

Post 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?
Locked