Page 1 of 2
manual install issues
Posted: Fri Sep 04, 2015 6:13 pm
by questrad
Red Hat Enterprise Linux Server release 6.6 (Santiago) 64 bit
Using User account to install: root
installing latest release 2014R2.7
Following
https://assets.nagios.com/downloads/nag ... ctions.pdf
Hello,
I have had some interesting issues with the manual install. I have have to remove some sudo commands from script create_postgres_db.sh and now im stuck at ./E-importnagiosql
Error
Starting httpd: ESC[60G[ESC[0;32m OK ESC[0;39m]
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
Now I have tried
cd /tmp/nagiosxi
cp -r ./subcomponents/nagioscore/mods/cfg/import/* /usr/local/nagios/etc/import
chown apache:nagios /usr/local/nagios/etc/import/*.cfg
./fullinstall
(got from
https://support.nagios.com/forum/viewto ... f=6&t=4470)
But still no luck :S
Need help

Re: manual install issues
Posted: Tue Sep 08, 2015 8:46 am
by questrad
Bump ?? Anyone??
Re: manual install issues
Posted: Tue Sep 08, 2015 9:01 am
by tmcdonald
Please do not bump threads - you reached us initially after end-of-day on Friday, and yesterday was a U.S. holiday so we were not in the office. Bumping a thread makes it appear "newer" on our dashboard, and since we handle threads from oldest to newest this will delay your response.
A few questions:
- Is this a brand new RHEL install or has it been modified? SELinux, package upgrades, anything like that?
- Do you have a proxy in use?
- How many times have you run the installer? Is this the first time and the first error?
Re: manual install issues
Posted: Tue Sep 08, 2015 9:27 am
by questrad
Sorry about the bump
Hope you had a great long weekend
questions:
Q1- Is this a brand new RHEL install or has it been modified? SELinux, package upgrades, anything like that? package upgrades??
A1- this a brand new RHEL install, and yum update was run days before running ./fullinstall
Q2- Do you have a proxy in use?
A2- Nope
Q3- How many times have you run the installer? Is this the first time and the first error?
A3- I have ran the installer a few times, fixing each error I am getting (first one was sudo commands from script create_postgres_db.sh)
Re: manual install issues
Posted: Tue Sep 08, 2015 2:30 pm
by lmiltchev
Can you post the entire install.log? It should be located in "/tmp/nagiosxi/" directory.
Re: manual install issues
Posted: Wed Sep 09, 2015 9:53 am
by questrad
here you go
Re: manual install issues
Posted: Wed Sep 09, 2015 10:42 am
by lmiltchev
I have have to remove some sudo commands from script create_postgres_db.sh and now im stuck at ./E-importnagiosql
Can you elaborate on this? We don't recommend modifying any of the install scripts...
I saw the following lines in the "install.log":
Code: Select all
Creating role and database...
su: invalid option -- 'u'
Try `su --help' for more information.
su: invalid option -- 'u'
Try `su --help' for more information.
ERROR: Nagios XI database was not setup properly - exiting.
and this:
Code: Select all
Creating role and database...
root is not in the sudoers file. This incident will be reported.
root is not in the sudoers file. This incident will be reported.
ERROR: Nagios XI database was not setup properly - exiting.
Can you show us a "sanitized" sudoers file? What changes did you make in "create_postgres_db.sh"? Did you run the installer script from the "/tmp" directory or another custom location?
Re: manual install issues
Posted: Wed Sep 09, 2015 11:01 am
by questrad
cat create_postgres_db.sh
psql --username=postgres -c "create user nagiosxi with password 'n@gweb';"
psql --username=postgres -c "create database nagiosxi owner nagiosxi;"
Sudoers ill get for you in a bit
Re: manual install issues
Posted: Wed Sep 09, 2015 1:34 pm
by questrad
What info do you need from sudoers, what would you like to know or see?
Here are the entries from your script
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
Re: manual install issues
Posted: Wed Sep 09, 2015 1:52 pm
by lmiltchev
Well, I was concerned about the root's entry in sudoers...
root is not in the sudoers file. This incident will be reported.
What is the output of the command below?