Missing hosts in Nagios

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.
Locked
chadmhs
Posts: 4
Joined: Wed Sep 19, 2012 10:50 am

Missing hosts in Nagios

Post by chadmhs »

Hello,

I recently installed Nagios & NagiosQL, everything seems to be ok. I am able to add hosts into QL but they never show up in Nagios on the Hosts page nor are they listed under the Host Groups. When I click "Check configuration files" in QL under tools I get "0 warnings, 0 errors, Written configuration files are valid. Nagios can be restarted". After I restart Nagios and check the hosts are still missing. Looking for a little guidance on this.

Thanks,
Chad
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Missing hosts in Nagios

Post by mguthrie »

Are the directories that NagiosQL is writing the config files into added into the main nagios.cfg file?
chadmhs
Posts: 4
Joined: Wed Sep 19, 2012 10:50 am

Re: Missing hosts in Nagios

Post by chadmhs »

Thanks for the reply. I'm relatively new to Nagios, which specific files should I be looking for in the nagios.cfg file?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Missing hosts in Nagios

Post by agriffin »

That varies from system to system. You're looking for the cfg_file and cfg_dir options in nagios.cfg. The files and directories they name should be the ones NagiosQL is writing to.
chadmhs
Posts: 4
Joined: Wed Sep 19, 2012 10:50 am

Re: Missing hosts in Nagios

Post by chadmhs »

Thanks. I see numerous cfg_file & cfg_dir entries in the nagios.cfg file but don't see anything related to the hosts that I setup anywhere in that file. If I need to update manually, where exactly would I do that?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Missing hosts in Nagios

Post by mguthrie »

You can tell Nagios to pull in the configs from a certain directing by adding:

Code: Select all

cfg_dir=/path/to/mynewconfigs
That way when you want to add new hosts, you just create the file and then drop them in that directory. If the file or directory is not specified in nagios.cfg, they won't be pulled into the monitoring configuration.
chadmhs
Posts: 4
Joined: Wed Sep 19, 2012 10:50 am

Re: Missing hosts in Nagios

Post by chadmhs »

Does that path go under a certain heading\section in the nagios.cfg file?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Missing hosts in Nagios

Post by mguthrie »

Nope, anywhere is fine as far as I know.
Locked