HostGroups is most feasible and important functionality provide by Nagios. HostGroups is used to group one or multiple hosts, and you will have the option to check all these hosts at one place or on a single page.
Assume you have more than 100 hosts configured on Nagios, and you want a quick look at all your host on Nagios with the status of each service, so such scenario hostgroup feature is useful. You will get the overview of all the hosts and services on the single page or else you need to go under the host tab and then search for a host which you want to check it will be a time-consuming process.
In this article, I am going to show you how to configure and use this compelling feature. Also trying to explain you each part so you will be able to add hostgroups for your hosts quickly.
I started with a direct explanation of host group feature by assuming that you have already running Nagios server and also configured your all hosts on it.
If not or you’re new to Nagios, please refer below step-by-step article of configuration and installation of Nagios server, etc.
You will learn lots of new things about the Nagios Monitoring from my blog “http://www.techthings.org”
Configuration of hostgroups on Nagios
Step 1: Create HostGroup File
After default Nagios installation you will not find any file to define hosts for hostgroup. In this situation, you need to create new configuration file under “/usr/local/Nagios/objects” directory where you will have all the Nagios configuration files.
Now we create a .cfg file called “hostsgroup.cfg” and define the hosts in the same file.