Page 1 of 2

Nagios 4 nconf Default_collector

Posted: Thu May 22, 2014 4:10 am
by domobcn
Hi,
I'm new at nagios, so I'll try to be specific as possible.
I have installed Nagios Core 4.0.5 and successfully installed Nconf also. However I can't "Generate Nagios Config" successfully. On Nagios 3 tutorials ( http://myliteraturetechlife.com/install ... ianubuntu/ ) I've seen people who comments most of the lines of the nagios.cfg and then create new directories on different paths where my nagios is. I'm not really sure where to place those directories and also how to get the Default_collector directory.

The message I get when I try yo generate Nagios Config is this:

Nagios Core 4.0.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-11-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/var/www/nconf/temp/Default_collector/advanced_services.cfg', starting on line 1)
Error processing object config files!


***> 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.


Obviously I don't have this directory but I wish to know how to get it for Nagios 4 configuration.

Thank you for your time and sorry if the questions are too easy.

Re: Nagios 4 nconf Default_collector

Posted: Thu May 22, 2014 2:40 pm
by abrist
Nconf does not support nagios core 4. It in fact has not had an updated release since 2011 (https://github.com/nconf/nconf).

Re: Nagios 4 nconf Default_collector

Posted: Mon Jul 13, 2015 3:19 pm
by sdbhabal
Abrist,

If Nconf does not support Nagios Core 4, can you please suggest alternative to Nconf which supports Nagios Core 4.

Regards
sdbhabal.

Re: Nagios 4 nconf Default_collector

Posted: Mon Jul 13, 2015 3:27 pm
by jolson
You might be interested in NagiosQL: https://exchange.nagios.org/directory/A ... QL/details

According to this post, NagiosQL may support Nagios 4.x: http://www.nagiosql.org/forum/general-q ... s-4-0.html

Re: Nagios 4 nconf Default_collector

Posted: Mon Jul 13, 2015 3:29 pm
by sdbhabal
Thanks Jolson for your prompt reply.
Will try NagiosQL & let u know.

Re: Nagios 4 nconf Default_collector

Posted: Mon Jul 13, 2015 3:30 pm
by jolson
No problem - if that doesn't work out for you, feel free to let us know. We'll try to come up with something that works. Thanks!

Re: Nagios 4 nconf Default_collector

Posted: Tue Jul 14, 2015 12:34 pm
by sdbhabal
Jolson,

As per you suggestion, I have configured nagios-4.0.8, nagios-plugins-2.0.3 with nagiosql_320.
I haven't faced any issue in installation.
After the installation by default hplj2605dn, linksys-srw224p, localhost & winserver hosts were added into the Nagios.
I have removed hplj2605dn, linksys-srw224p & winserver hosts & there associated services using NagiosQL.
But still all this hosts & there services displayed in Nagios dashboard.
I don't know why, whatever changes I m doing in NagiosQL is not reflecting in Nagios.
After this I have manually restarted Nagios server from backend & all the changes got reflected.
Now only Localhost is available in Hosts of Nagios.
I dont know why this was happening, But 'Restart Nagios' button in NagiosQL seems not working (I have checked in the nagios.log, no log append)
Please help.

Regards
sdbhabal.

Re: Nagios 4 nconf Default_collector

Posted: Tue Jul 14, 2015 4:28 pm
by jolson
Any errors in the http or mysql logs?

Code: Select all

cat /var/log/mysqld.log
cat /var/log/httpd/error_log
cat /var/log/httpd/access_log

Re: Nagios 4 nconf Default_collector

Posted: Wed Jul 15, 2015 2:53 am
by sdbhabal
Jolson,

In Tools -> Nagios Control.

When I click on Check configuration files: -> ''Do it'' button.
Below is the log generated in /var/log/http/access_log file.
173.32.2.20 - nagiosadmin [15/Jul/2015:03:42:21 -0400] "POST /nagios/webadmin/admin/verify.php HTTP/1.1" 200 9121 "http://11.20.1.6/nagios/webadmin/admin/verify.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"

And when I click on Restart Nagios: -> ''Do it'' button.
Below is the log generated in /var/log/http/access_log file.
173.32.2.20 - nagiosadmin [15/Jul/2015:03:42:25 -0400] "POST /nagios/webadmin/admin/verify.php HTTP/1.1" 200 7792 "http://11.20.1.6/nagios/webadmin/admin/verify.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"

Regards
sdbhabal.

Re: Nagios 4 nconf Default_collector

Posted: Wed Jul 15, 2015 11:37 am
by jdalrymple
sdbhabal,

I expect the interesting stuff to be in /var/log/httpd/error_log - please tail that log. I suspect apache just doesn't have the appropriate permissions to apply the config for one reason or another.

That said - I've fiddled with config managers, including both nconf and nagiosql. If you truly want the feeling of a nice integrated GUI config manager I highly recommend you check out our commercial product. If it's outside of your price range I think you'd be doing yourself a disservice to bolt on one of these other configuration managers as they've all dried up as far as support and development. Also it gets really hairy when they fall short of the configurations that you need and you end up with mixed configs.