Nagios 4 nconf Default_collector

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.
domobcn
Posts: 1
Joined: Thu May 22, 2014 3:54 am

Nagios 4 nconf Default_collector

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios 4 nconf Default_collector

Post 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).
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.
sdbhabal
Posts: 27
Joined: Fri Nov 25, 2011 2:31 am

Re: Nagios 4 nconf Default_collector

Post 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.
Last edited by sdbhabal on Mon Jul 13, 2015 3:27 pm, edited 1 time in total.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios 4 nconf Default_collector

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
sdbhabal
Posts: 27
Joined: Fri Nov 25, 2011 2:31 am

Re: Nagios 4 nconf Default_collector

Post by sdbhabal »

Thanks Jolson for your prompt reply.
Will try NagiosQL & let u know.
Last edited by sdbhabal on Mon Jul 13, 2015 3:53 pm, edited 1 time in total.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios 4 nconf Default_collector

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
sdbhabal
Posts: 27
Joined: Fri Nov 25, 2011 2:31 am

Re: Nagios 4 nconf Default_collector

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Nagios 4 nconf Default_collector

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
sdbhabal
Posts: 27
Joined: Fri Nov 25, 2011 2:31 am

Re: Nagios 4 nconf Default_collector

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios 4 nconf Default_collector

Post 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.
Locked