errors generating nagios conf

Support requests, bug reports, questions etc.
Guest

errors generating nagios conf

Post by Guest » Wed Apr 18, 2012 21:18

I am struggling with generating our nagios config's through the nconf gui. I've imported all of our hosts/services/templates using the import guide: http://www.nconf.org/dokuwiki/doku.php? ... ort_nagios

I get errors right off the bat with this below (I've tried adding a host-preset because none exist, but there is nothing to select in the "host-alive check" drop down box which is a mandatory field). I'm assuming this will have to be set for every host:

Code: Select all

[INFO]  Starting generate_config script
[INFO]  Generating global config files
[INFO]  Generating config for Nagios-collector 'Default Nagios'
[ERROR] Failed to get host-alive check for host 'server'. Make sure the host is linked with a host-preset. Aborting.


And then this as well:

Code: Select all

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/var/www/html/nconf/temp/test/Default_collector.cfg' for reading!
Error processing main config file!



***> The name of the main configuration file looks suspicious...

Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'

***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

ekrengel
starter
starter
Posts: 4
Joined: Wed Apr 18, 2012 21:09

Re: errors generating nagios conf

Post by ekrengel » Thu Apr 26, 2012 21:16

Has no one seen this yet? I've searched the forum but cannot find any similar issues.

JPs
starter
starter
Posts: 2
Joined: Wed Apr 25, 2012 14:54

Re: errors generating nagios conf

Post by JPs » Fri Apr 27, 2012 08:31

Nconf looks in "misccommands" for the host-alive-check. If there is no misccommand specified you could not choose one for the host alive check!

You have to differ between "checkcommands" and "misccommands" in nconf.

Misccommands: commands for "internal" use. For example "send_nsca", "notification" and host-alive-checks
Checkcommands: The checks you want to use in a service, (ssh, snmp, ....)

Regards

Jan-Peter

ekrengel
starter
starter
Posts: 4
Joined: Wed Apr 18, 2012 21:09

Re: errors generating nagios conf

Post by ekrengel » Mon Apr 30, 2012 15:24

Hmm, so what do you suggest I do? I really don't know how to resolve this.

Do I have to import a host-alive-check? How can I do that?

ekrengel
starter
starter
Posts: 4
Joined: Wed Apr 18, 2012 21:09

Re: errors generating nagios conf

Post by ekrengel » Tue May 01, 2012 19:48

Actually, I just imported a miscommand, and I don't think that's what I needed.

I need to import a "Host presets"...but there isn't a command for that on the import guide. How can I get the host presets populated? FYI these are different from host templates.

ekrengel
starter
starter
Posts: 4
Joined: Wed Apr 18, 2012 21:09

Re: errors generating nagios conf

Post by ekrengel » Tue May 01, 2012 19:55

Nevermind I figured it out. I had to add the miscommand, then create a new host preset. When creating the host preset, the miscommand that I imported was automatically selected. After creating the host preset, I checked the rest of my hosts and the preset that I created was automatically selected for each host.

Going to try generating the config again...

Locked