Install fails on ./E-importnagiosql

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mindframe
Posts: 4
Joined: Fri Nov 12, 2010 4:54 pm

Install fails on ./E-importnagiosql

Post by mindframe »

--22:07:31-- http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 84 [text/html]
Saving to: `nagiosql.export.additional'

100%[=========================================================>] 84 --.-K/s in 0s

22:07:31 (164 KB/s) - `nagiosql.export.additional' saved [84/84]

CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Unable to open main config file '/usr/local/nagios/etc/nagios.cfg'
Error processing object config files!


***> 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.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi



The file is there and permissions are fine. I even chmod 777'd the whole dir, no dice.


Code: Select all

[root@s600nj3vl03 nagiosxi]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Unable to open main config file '/usr/local/nagios/etc/nagios.cfg'
   Error processing object config files!


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

Code: Select all

[root@s600nj3vl03 nagiosxi]# ls -l /usr/local/nagios/etc
total 120
-rwxrwxrwx 1 nagios nagios  744 Nov 12 21:30 cgi.cfg
drwxrwxrwx 2 nagios nagios 4096 Nov 12 21:30 hosts
drwxrwxrwx 2 nagios nagios 4096 Nov 12 22:07 import
-rwxrwxrwx 1 nagios nagios 5714 Nov 12 21:30 nagios.cfg
-rwxrwxrwx 1 nagios nagios 2229 Nov 12 21:32 ndo2db.cfg
-rwxrwxrwx 1 nagios nagios 4723 Nov 12 21:32 ndomod.cfg
-rwxrwxrwx 1 nagios nagios 7207 Nov 12 21:32 nrpe.cfg
-rwxrwxrwx 1 nagios nagios 5345 Nov 12 21:32 nsca.cfg
drwxrwxrwx 4 nagios nagios 4096 Nov 12 21:32 pnp
-rwxrwxrwx 1 nagios nagios  210 Nov 12 21:30 resource.cfg
-rwxrwxrwx 1 nagios nagios 1627 Nov 12 21:32 send_nsca.cfg
drwxrwxrwx 2 nagios nagios 4096 Nov 12 21:30 services
drwxrwxrwx 2 nagios nagios 4096 Nov 12 21:30 static
Any ideas?

[root@s600nj3vl03 nagiosxi]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

[root@s600nj3vl03 nagiosxi]# uname -a
Linux s600nj3vl03 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:27 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Last edited by mindframe on Fri Nov 12, 2010 5:14 pm, edited 1 time in total.
mindframe
Posts: 4
Joined: Fri Nov 12, 2010 4:54 pm

Re: Install fails on ./E-importnagiosql

Post by mindframe »

Code: Select all

[root@s600nj3vl03 nagiosxi]# cat /usr/local/nagios/etc/nagios.cfg 
# MODIFIED
admin_email=root@localhost
admin_pager=root@localhost
translate_passive_host_checks=1
log_event_handlers=0
use_large_installation_tweaks=1
enable_environment_macros=0


# NDOUtils module
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg


# PNP settings - bulk mode with NCPD
process_performance_data=1
# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-pnp-bulk
# host performance data
host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-pnp-bulk


# OBJECTS - UNMODIFIED
#cfg_file=/usr/local/nagios/etc/objects/commands.cfg
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
#cfg_file=/usr/local/nagios/etc/objects/templates.cfg
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg


# STATIC OBJECT DEFINITIONS (THESE DON'T GET EXPORTED/IMPORTED BY NAGIOSQL)
cfg_dir=/usr/local/nagios/etc/static

# OBJECTS EXPORTED FROM NAGIOSQL
cfg_file=/usr/local/nagios/etc/contacttemplates.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/servicegroups.cfg
cfg_file=/usr/local/nagios/etc/hosttemplates.cfg
cfg_file=/usr/local/nagios/etc/servicetemplates.cfg
cfg_file=/usr/local/nagios/etc/servicedependencies.cfg
cfg_file=/usr/local/nagios/etc/serviceescalations.cfg
cfg_file=/usr/local/nagios/etc/hostdependencies.cfg
cfg_file=/usr/local/nagios/etc/hostescalations.cfg
cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services

# GLOBAL EVENT HANDLERS
global_host_event_handler=xi_host_event_handler
global_service_event_handler=xi_service_event_handler



# UNMODIFIED
accept_passive_host_checks=1
accept_passive_service_checks=1
additional_freshness_latency=15
auto_reschedule_checks=0
auto_rescheduling_interval=30
auto_rescheduling_window=180
bare_update_check=0
cached_host_check_horizon=15
cached_service_check_horizon=15
check_external_commands=1
check_for_orphaned_hosts=1
check_for_orphaned_services=1
check_for_updates=1
check_host_freshness=0
check_result_path=/usr/local/nagios/var/spool/checkresults
check_result_reaper_frequency=10
check_service_freshness=1
command_check_interval=-1
command_file=/usr/local/nagios/var/rw/nagios.cmd
daemon_dumps_core=0
date_format=us
debug_file=/usr/local/nagios/var/nagios.debug
debug_level=0
debug_verbosity=1
enable_embedded_perl=1
enable_event_handlers=1
enable_flap_detection=1
enable_notifications=1
enable_predictive_host_dependency_checks=1
enable_predictive_service_dependency_checks=1
event_broker_options=-1
event_handler_timeout=30
execute_host_checks=1
execute_service_checks=1
external_command_buffer_slots=4096
high_host_flap_threshold=20.0
high_service_flap_threshold=20.0
host_check_timeout=30
host_freshness_check_interval=60
host_inter_check_delay_method=s
illegal_macro_output_chars=`~$&|'"<>
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
interval_length=60
lock_file=/usr/local/nagios/var/nagios.lock
log_archive_path=/usr/local/nagios/var/archives
log_external_commands=1
log_file=/usr/local/nagios/var/nagios.log
log_host_retries=1
log_initial_states=0
log_notifications=1
log_passive_checks=1
log_rotation_method=d
log_service_retries=1
low_host_flap_threshold=5.0
low_service_flap_threshold=5.0
max_check_result_file_age=3600
max_check_result_reaper_time=30
max_concurrent_checks=0
max_debug_file_size=1000000
max_host_check_spread=30
max_service_check_spread=30
nagios_group=nagios
nagios_user=nagios
notification_timeout=30
object_cache_file=/usr/local/nagios/var/objects.cache
obsess_over_hosts=0
obsess_over_services=0
ocsp_timeout=5
p1_file=/usr/local/nagios/bin/p1.pl
passive_host_checks_are_soft=0
perfdata_timeout=5
precached_object_file=/usr/local/nagios/var/objects.precache
resource_file=/usr/local/nagios/etc/resource.cfg
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0
retained_host_attribute_mask=0
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0
retained_service_attribute_mask=0
retain_state_information=1
retention_update_interval=60
service_check_timeout=60
service_freshness_check_interval=60
service_inter_check_delay_method=s
service_interleave_factor=s
sleep_time=0.25
soft_state_dependencies=0
state_retention_file=/usr/local/nagios/var/retention.dat
status_file=/usr/local/nagios/var/status.dat
status_update_interval=10
temp_file=/usr/local/nagios/var/nagios.tmp
temp_path=/tmp
use_aggressive_host_checking=0
use_embedded_perl_implicitly=1
use_regexp_matching=0
use_retained_program_state=1
use_retained_scheduling_info=1
use_syslog=1
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Install fails on ./E-importnagiosql

Post by mguthrie »

Just to verify, did you run the install scripts from the /tmp directory? If you run it from a different directory there will be permissions issues.
mindframe
Posts: 4
Joined: Fri Nov 12, 2010 4:54 pm

Re: Install fails on ./E-importnagiosql

Post by mindframe »

Yes. The zip file was extracted to /tmp/nagiosxi
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Install fails on ./E-importnagiosql

Post by mguthrie »

Ok, upon a closer inspection, I'm wondering if the permission script failed somehow. The permissions on your /usr/local/nagios/etc are incorrect.

There should be a script at /usr/local/nagiosxi/scripts/reset_config_perms that will reset all of the files to the correct permissions. Try running that and then running the E-importnagiosql script and see if gets you through the script.
mindframe
Posts: 4
Joined: Fri Nov 12, 2010 4:54 pm

Re: Install fails on ./E-importnagiosql

Post by mindframe »

I ran the script /usr/local/nagiosxi/scripts/reset_config_perms.sh

I ran successfully so I rerain E-importnagiosql. Running it as root. Still getting same error:

CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Unable to open main config file '/usr/local/nagios/etc/nagios.cfg'
Error processing object config files!


***> 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.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Install fails on ./E-importnagiosql

Post by mguthrie »

Are you using a proxy on your server by chance?
http://support.nagios.com/wiki/index.ph ... th_Proxies

OR, are you using SSL on your webserver?

The E-nagiosql script makes a wget call to grab cookies and actually login to NagiosQL to import the files into the database, and then write them out to the files. We found an issue yesterday with SSL that we just fixed for our next release. Let us know if you're using either of these, because there will have to be a few extra steps taken to get this script to execute correctly.
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Install fails on ./E-importnagiosql

Post by mocjack »

I do not have either of these, but I am getting the same error now:

CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config directory '/usr/local/nagios/etc/services'...
Error: Template '' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 14)
Error processing object config files!


***> 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.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi



Can I still proceed?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Install fails on ./E-importnagiosql

Post by mguthrie »

A couple of questions before moving forward.

Is your copy of RHEL registered on the RHN? The install scripts will fail if you're not.

Did you place any configuration files manually in the /usr/local/nagios/etc directory?

The error that your getting is a syntax error with the Nagios config files. It will need to be corrected before Nagios can be started. Can you post the contents of the contacts.cfg?
mocjack
Posts: 31
Joined: Fri Dec 17, 2010 10:06 am

Re: Install fails on ./E-importnagiosql

Post by mocjack »

mguthrie wrote:A couple of questions before moving forward.

Is your copy of RHEL registered on the RHN? The install scripts will fail if you're not.

--- No, I am using 64bit CENTOS

Did you place any configuration files manually in the /usr/local/nagios/etc directory?
'
---No, nothing like this

The error that your getting is a syntax error with the Nagios config files. It will need to be corrected before Nagios can be started. Can you post the contents of the contacts.cfg?
---Well i have already tried reinstalling as 32 bit now... But I would much rather have this running as 64 bit as this is going to be a heavily used server.

Anything you can do would be appreciated. Should I try the latest DEV release?
Locked