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.
OK, I defined my hostgroups. The instructions never told me to do that saying they would be generated anyway. My mistake. Sanity check still fails with
Processing object config file '/etc/nagios/conf.d/services_nagios2.cfg'...
Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/conf.d/services_nagios2.cfg', starting on line 42)
Error processing object config files!
If this is still on your nagios server, nrpe configuration is not needed. That should only be done on the remote system running the nrpe agent. Additionally, they should not be included in the nagios core engine configs to load. What guide are you referring to?
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.
I am following this guide. Under a part that says Nagios Server, it mentions that the full list of services would be on the bottom. Should I remove my services_nagios2.cfg? Where do I define how the Nagios server connects to the nrpe servers?
Yes, I would definitely suggest removing that file, and any others referencing nrpe commands from the nagios core machine. The basic gist of nrpe is:
Configure nagios server to with remote host and service. Service check is check_nrpe with arguments defining what and how to have remote nrpe daemon execute.
On the remote machine, you have nrpe installed and listening for commands. It also has it's own Core like configurations that define commands available. When your nagios server connects, the agent executes a plugin local to it, and returns the results to the nagios core system.
You never should need nrpe and core on the same machine, and in the same sense, never need nrpe cofigs. Hope that helps clarify some!
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.
That makes things a lot clearer. I also seem to be getting somewhere with my configuration. I ran the sanity check after removing the service config, and it worked well except for one error.
Processing object config file '/etc/nagios/conf.d/ftb.website.com.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Error: There are no services defined!
Checked 0 services.
Checking hosts...
Warning: Host 'ftb' has no services associated with it!
Warning: Host 'ftb' has no default contacts or contactgroups defined!
Checked 1 hosts.
Checking host groups...
Checked 2 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 2
Total Errors: 1
Now, I have to define the host information inside the ftb.website.cfg file? I also have to define a service to check the NRPE daemons running on the other machines. I do this using check_nrpe, which would be defined as a service? Do the NRPE daemons require a password to authenticate? Should I just put all this information inside the ftb.website.cfg file? So, it would have the host defined, as well as the services for that host inside one file.
You can define the services in any file you wish, as long as it is formatted correctly and is included in the nagios.cfg. The organizational structure of your core configs are yours to choose.
Core requires at least 1 host and at least 1 service. So you are really close. Just create at least 1 service check and re-verify.
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.