This post is also available in: French
Host, Service, Host Group, Hosted services… The Nagios© and Centeron users know these terms by heart. Some Centreon users use regularly Nagios and want to have all Nagios features available… even the ones which shouldn’t be available for us. One of these features is assigning a service to multiple hosts. This article is based on our expertise and experience and its aim is to explain why you shouldn’t attach a service to multiple hosts.
Before getting to the heart of the matter, here are a few reminders:
- Host: monitored equipment (for example, a server Windows/Linux/AIX/HP-UX/Solaris/AS400… or switch/router/firewall/SSL gateway/IP compression/power supply…)
- Service: a specific monitoring indicator on an host (for example cpu/memory/partition/process/interface/network/bandwidth/temperature/connexion/…)
- Host Group: a logical grouping of hosts. This grouping should be logical for a human being :
grouping by Operating System (“all Windows servers”, “all Linux servers”, …), by location (continent/country/region/city/building/room), by type (“database”, “application server”,…), by application (“ERP”) or by what you want that makes sense to you.
- Services group: a logical grouping of services. The principle is similar to the host grouping but most of the time, we use services groups for applications (“ERP”).
Dependencies between a service and a Host Group
To create a service and to attach it to an host group, it is very simple: you do the same thing that you do to create a service linked with an host, but this time, you just attach it to an Host Group.
First, you create a service, you give it a name and you use a service template:
Then, you go to the tab «Relations», you don’t click on an host and you choose the Host Group that you want:
Assigning a service to multiple hosts: why it is not such a good idea
When a service is linked with an Host Group, the service is the same for all hosts of this Host Group. It means that if there are 200 hosts in the Host Group, the service is exactly the same for these 200 hosts. It means :
- Same name
- same configuration
- same threshold
The benefit of this is “configuration made easy”: indeed, I configure my service once and it is the same everywhere.
This is what we are used to hear from our customers and users… and actually, it IS quick but it’s a real trap!
Any time you make a chance to the service, this change will affect all group members. But, a group is (most of the time) composed of unique elements: each server is unique! Indeed, two servers run different applications with different loads, have load peak at different periods, etc. Imagine, imagine a very standardized environment: same provider, same server type, same CPU, same memory, same physical disks, same network cards, same Operating system, same partitioning, same system configuration, etc. Even in such an environment, to make a service assignment to multiple hosts worth it, all the machines must do the exact same thing!
Servers don’t always run the same applications and they don’t have the same teamplate. The CPU occupancy rate for a database is probably higher than DHCP server. Why should we have the same configuration then? Because they all are Linux servers, please!?!
In this case, if i want to adapt my monitoring policy, the solution is:
1. I don’t do it : if I do it, all my hosts will be impacted and for example, I want to change only one threshold for a specific server;
2. I can set a very high threshold: by doing this, I’m sure not to have false positive. Problem: I can’t see the true positives that indicate a CPU occupancy rate going crazy. It’s strange… It shouldn’t do anything but it is loaded… Something is happening… but I can’t see it because the value is too high and I won’t be alerted;
3. I do it putting out the host from Host Group, and then creating a specific service on this host… While I first create a group “Linux servers”,why do I have only one Linux machine alone?
4. 4. I create several Host Groups, one for the high-loaded CPU, another one for loaded CPU and another for little-loaded CPU. Of course, I cut in three parts for memory, then in three parts for swap, and three parts again for partition, etc. What a complexity! It was done to make my life easier and now I don’t understand anything at my own set up.
Conclusion: We don’t assign a service with Host Group! At first sight, it seems to be very practical for the first configuration but an IT system lives: new servers can be installed, others go away, applications can be used very often for a period of time and then be less used, servers can be consolidated and then separated for a better security purpose and then consolidated again for monitoring, and separated again… So the threshold values have to follow these modifications. So, the monitoring is not efficient because it doesn’t reflect the reality of the IT architecture.
The only case where you can really assign a service with Host Group is when you are sure that this service will be exactly identical for the next three years in both configuration and threshold values. I think of one case: ping check, and I’m not so sure because a ping on LAN and a ping on WAN are two different things…
How to obtain the same result?
Don’t worry; we can obtain the same result with Centreon, using the service models! The service models will be the subject for the next articles. Their configuration is quite difficult to manage at first but very efficient to use. So, we are giving you some ideas to begin using them:
1. To create a Linux host model;
2. To create CPU service model (Linux), to definite macros for this service and to link this model and host model previously established;
3. When you create a new Linux host, just use this host model;
So, all new hosts based on this host model will be perfectly identical ==> industrialized configuration If you want to modify a threshold value of CPU service on a particular host: you can do it by modifying a corresponding macro. Thus, you keep the configuration flexibility! Great… Stay tuned with the next articles!
Incoming search terms:
- centreon service linked to multiple hosts
- add mutiple windows servers in nagios
- Service Overview For All Host Groups 見方