Update Nconf for 1.2.5 to 1.3.0

Everything related to Installation/Update comes here
sarthak
beginner
beginner
Posts: 12
Joined: Tue Jun 15, 2010 19:40

Update Nconf for 1.2.5 to 1.3.0

Post by sarthak » Thu Jun 21, 2012 09:33

Hi,

I am upgrade Nconf gor 1.2.5 to 1.3 ..

after upgrade its showing below errors --


can not open main configuration file /var/www/html/nconf/test/Default_collector.cfd for reading

I am not sure what is Problme

sarthak
beginner
beginner
Posts: 12
Joined: Tue Jun 15, 2010 19:40

Re: Update Nconf for 1.2.5 to 1.3.0

Post by sarthak » Thu Jun 21, 2012 13:02

Detail Error is below ...

Nagios 3.1.2
Copyright (c) 2009 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-23-2009
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

User avatar
Bennyvision
NConf expert
NConf expert
Posts: 87
Joined: Mon Jul 19, 2010 21:01
Location: Kansas City, MO, USA

Re: Update Nconf for 1.2.5 to 1.3.0

Post by Bennyvision » Mon Jun 25, 2012 21:38

What do you get when you issue the following command on the NConf server:

Code: Select all

ls -al /var/www/html/nconf/temp/test/Default_collector.cfg
?

sarthak
beginner
beginner
Posts: 12
Joined: Tue Jun 15, 2010 19:40

Re: Update Nconf for 1.2.5 to 1.3.0

Post by sarthak » Tue Jun 26, 2012 15:23

after changing require permission that error has gone ..bur below error has come ...


in temp directory no files are generated .. but when I hit to generate config below is error ..

Error: Invalid max_check_attempts value for host 'ADC-HYD-FW'
Error: Could not register host (config file '/var/www/html/nconf/temp/Default_collector/hosts.cfg', starting on line 389)..

Not sure why this error has come ...

User avatar
Bennyvision
NConf expert
NConf expert
Posts: 87
Joined: Mon Jul 19, 2010 21:01
Location: Kansas City, MO, USA

Re: Update Nconf for 1.2.5 to 1.3.0

Post by Bennyvision » Tue Jun 26, 2012 16:37

Do you *have* a max_check_attempts value defined for that host? Is it defined in the host template?

I see errors like this when I have a mental blip and forget to assign a template to a host or service.

sarthak
beginner
beginner
Posts: 12
Joined: Tue Jun 15, 2010 19:40

Re: Update Nconf for 1.2.5 to 1.3.0

Post by sarthak » Fri Jun 29, 2012 09:35

No there are no max_check_attempts value defined for that host .. and I have tried to delete this host & hit generate config but same error for other host

Processing object config directory '/var/www/html/nconf/static_cfg'...
Error: Invalid max_check_attempts value for host 'ABC'
Error: Could not register host (config file '/var/www/html/nconf/temp/Default_collector/hosts.cfg', starting on line 535)
Error processing object config files!

again this directory is Emptry "var/www/html/nconf/temp" I am not sure why this is happening ..

User avatar
Bennyvision
NConf expert
NConf expert
Posts: 87
Joined: Mon Jul 19, 2010 21:01
Location: Kansas City, MO, USA

Re: Update Nconf for 1.2.5 to 1.3.0

Post by Bennyvision » Fri Jun 29, 2012 14:00

It's happening because the sanity check is failing. Until that completes successfully, you'll get no output.

max_check_attempts is a required directive for hosts and services, IIRC. Have you been messing around with the attributes or anything? I believe it should be part of the generic host template.

sarthak
beginner
beginner
Posts: 12
Joined: Tue Jun 15, 2010 19:40

Re: Update Nconf for 1.2.5 to 1.3.0

Post by sarthak » Mon Jul 02, 2012 13:47

HI Bennyvision ,

thanks for all your Help .. my problem has been resolved ...

1: I Upgraded Nocnf 1.2.5 to 1.2.6 manually ..below are steps

a: mysql -u root -p nconf < update_database_1.2.5_to_1.2.6.sql
b: mysrver://nconf/Update.php
c: delete mentioned files
d:generate nagios config without any error

2: manaully Upgrade 1.2.6 to 1.3

a:./convert_timeperiods_collectors.pl
b: mysql -u root -p nconf < update_database_1.2.6_to_1.3.0.sql
c: mysrver://nconf/Update.php
d: delete mentioned files
e:generate nagios config without any error


regards
Hemant

Locked