Configuring and grouping hosts, services and commands


Hi all,

I have been teaching myself Nagios over the past few weeks and have a basic setup on my test servers to monitor key services and resources on Windows Servers, switches and routers. I have been defining hosts and services manually each time I want to use them to make sure I know how to get it running once however what I am looking at doing is rolling it out to monitor each of the 300 clients my company supports.

Obviously I want to centralise this as much as possible so that if we have new clients I dont need to write masses of new lines of config to get them included. My idea then was to create servicegroups for “Exhange Services” “Active Directory Services” “SQL Services” etc and then assigning these to a hostgroup for “Exchange Servers” “AD Servers” “SQL Servers” and then make each host a member of the hostgroup for “Exchange Server” “Domain Controllers” “SQL Servers” etc.

What I am trying to work out is if this is the best way of abstracting the information so that when a new client comes in I can create a hostgroup for the client and then add each server, router, switch etc into that hostgroup and then if the server runs Exchange add them to the Exchange Servers hostgroup etc without having to say EXCH-01 has a SMTP service, Exchange Information Store service and adding them in this long winded way.

Has anyone set their Nagios up in this way that can provide some rough guidelines. Apologies if this doesnt make masses of sense - I have spent the last hour trying to build the structure in my head and its starting to get away from me.



I am also New to Nagios, So if any Mistakes done please make corrections.

To my Experience what i have done with Nagios,
Ya You can Do that Way

  1. Configure a HostGroup(eg: Exchange Servers) for each of your Hosts to be a member of it.
  2. Create a Host Definition for each Host that should be a part of that Group and add that host to that Particular HostGroup
  3. Create a Service Group if you Need
  4. Create a Service Definition for SMTP or Exchange and just it is enough you give the HostGroup you Configured.(eg: Exchange Servers)
  5. From Now on if any new host comes just create the Host Definition and add it to HostGroup. You are done. It will automatically be a part of Service Group.


Can I use multiple Host definitions for one physical host? I want to make sure that if a server has multiple roles I can add two groups to that server and it will inherit all the relevant services?