Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
This is my first time posting on this site so please be gentle.
I have recently been asked to learn Nagios and build a server to fit into our infrastructure environment. I have the Core installed and have been working through the documentation as well as other sites I have found to help. I am very impressed with the possibilities of Nagios and its adaptability.
One thing I seem to be having an issue with and I thought that this was an easy part of the system is host groups. I am attempting to create a new host group for our ESXi servers but I do not seem to be able to get the group to show. I thought it was as simple as creating the template in the template.cfg file, adding the host definition to a config file (either newly created and added to the nagios.cfg file or adding to an already existing cfg file) and then creating a object config file with the host and service to be monitored. I expected Nagios to pick up the new templates and host group config files and run with it, adding it to the web interface but I cannot get the new host group to appear on the web side. I get no errors pertaining to the group in the nagios.log file and Nagios restarts without and config errors. It's like it's ignoring the new host group cfg file.
If I place the host in the Windows Server host group it shows with no issues at all.
define hostgroup {
hostgroup_name all_vmwareesxvspherevcenterserver_hosts
alias All VMware ESX - vSphere - vCenter Hosts
members In house Switch,Lmilt XI,Windows 2k8
}
Does the file need to be called hostgroup.cfg? Is this a requirement? I created an esxi.cfg file in the objects folder with just the host group in there. This file is defined in the nagios.cfg file and shows being processed in verbose output when manually starting the Nagios service.
Well, you must create a host group definition within that file yes, then, you can add hosts directly to that group using the "members" definition, or define the hostgroup in the hosts host.cfg file, please take a look at this page here:
Thank you, the issue was down to my mix up between templates and host groups.
I had a template named esxi-server and a group named the same. I misread the config file thinking it would add itself to the host group using the field for the template. I have renamed the group and added the members section as you have suggested and the group has now appeared.