Page 1 of 2

Apply configuration not working after upgrade to XI 5.

Posted: Wed Oct 21, 2015 8:14 am
by inas.labib
Hi,

We recently upgraded our Nagios XI server from version 2014R2.5 to 5.2.0. After the upgrade we can't seem to make any changes using the CCM. It stays at "Waiting for configuration verification..............................................." forever. It neither throws an error or times out.

The following works fine:
su nagios
/usr/local/nagios/libexec/
./reconfigure_nagios.sh

./reconfigure_nagios.sh throws an error as well: sudo: ldap_sasl_bind_s(): Can't contact LDAP server.

I also looked for and removed the reconfigure_nagios_lock file earlier.

What could be the issue?

Thanks.

Re: Apply configuration not working after upgrade to XI 5.

Posted: Wed Oct 21, 2015 8:50 am
by inas.labib
We are also getting the following error when we force a check: "Your request was not processed in a timely manner..."

Re: Apply configuration not working after upgrade to XI 5.

Posted: Wed Oct 21, 2015 1:41 pm
by lmiltchev
Were you using LDAP prior to the upgrade or you started using it after the upgrade? Did you set the "nagiosadmin" user to use LDAP? Give us some info on how you modified your XI instance.

Show the output of:

Code: Select all

uname -a
cat /etc/*release
Run the following commands:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> /tmp/reconfig.txt
and post the "reconfig.txt" file that was generated in the "/tmp/" directory from running the above command.

Re: Apply configuration not working after upgrade to XI 5.

Posted: Thu Oct 22, 2015 2:15 am
by inas.labib
Hi ,

We have been using LDAP before upgrade , "nagiosadmin" user is not from LDAP.
Now none of the LDAP users are able to login to the Nagios server.
Please find the attached "reconfig.txt" and other details below.

# uname -a
Linux wp1rngs02t.wdprocessing.pvt 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19 12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)

Thanks

Re: Apply configuration not working after upgrade to XI 5.

Posted: Thu Oct 22, 2015 10:17 am
by lmiltchev
It is possible that the issue is caused by a specific version of openldap or a misconfiguration - I am not sure.

I found the following explanation in the redhat knowledge base:

https://access.redhat.com/solutions/36836#

Please, verify the "/etc/ldap.conf" for any misconfiguration. Hope this helps.

Re: Apply configuration not working after upgrade to XI 5.

Posted: Sun Oct 25, 2015 9:59 am
by inas.labib
After further troubleshooting we got to the point where ./reconfigure_nagios.sh as nagios user was getting stuck waiting for sudo password. We fixed this issue by adding a few lines to /etc/sudoers but want to confirm if this is is the right way to do it.

grep -i nagios /etc/sudoers:

# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/reset_config_perms.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/restart_nagios_with_export.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/import_nagiosql.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/manage_services.sh

#nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_asterisk_sip_peers.sh, /usr/local/nagios/libexec/nagisk.pl, /usr/sbin/asterisk

Re: Apply configuration not working after upgrade to XI 5.

Posted: Mon Oct 26, 2015 10:11 am
by tgriep
What you have in the sudoers looks like it is just the minimal needed for just applying the configuration. I have included the default settings needed in the sudoers file below. You may want to edit yours to match.

Code: Select all

Defaults:nagios !requiretty
Defaults:apache !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_linux_stats.pl

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/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
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 *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.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/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
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: Apply configuration not working after upgrade to XI 5.

Posted: Tue Oct 27, 2015 9:20 am
by ranjitw
Hi ,

Will try this solution and provide an update.

Re: Apply configuration not working after upgrade to XI 5.

Posted: Tue Oct 27, 2015 1:27 pm
by tgriep
Let us know if this solves it for you.

Re: Apply configuration not working after upgrade to XI 5.

Posted: Tue Nov 17, 2015 9:36 am
by inas.labib
Inserting the correct entries to /etc/sudoers fixed this issue. I am pretty sure the upgrade messed up the file.