Nagios XI - Apply Configuration Never Completes
If you attempt to Apply Configuration and you're seeing the following output:
The following error message is produced:
* Configuration submitted for processing...
The configuration never applies, the page may be timing out.
There are several reason why this problem may be occurring, each one of them is outlined below.
In many steps of this article you will be required to edit files. This documentation will use the vi text editor. When using the vi
Missing / Incorrect sudoers Entries
The backend components in Nagios XI require high level privileges, these are accommodated for in sudoers entries. This allows for high level commands to be executed by scripts without requiring user input. If these entries are missing then they can cause unexpected results.
Examples Of Errors / Behaviours
When tailing the log /usr/local/nagiosxi/var/cmdsubsys.log you see:
Another reconfigure process is still running, sleeping...
sudo: no tty present and no askpass program specified
Another error occurs if you su as the nagios user and execute the following commands:
You are prompted for the password for the nagios user:
You should not be prompted for the password, this is another indication that the sudoers entries are incorrect/missing.
You may eventually get the following error on the Apply Configuration screen:
Reset config permissions failed.
Fixing the sudoers Entries
The following steps shows you how to get the correct sudoers entries from the XI installation file. It is not possible to provide all the entries in this KB article as they may change in newer versions of XI. These steps ensure you get the correct entries for your version of Nagios XI.
First you must download the XI installation file to your Nagios XI server. You'll do this with the wget command. Please refer to the following link to get the correct download link for your version of Nagios XI:
Open an ssh session to your Nagios XI host. If you are already connected as the nagios user (in the step above) you will need to exit to become an admin.
Execute the following commands (use your XI version download link in the wget command):
Once downloaded you'll need to use the name of the downloaded file in the next command, in this example xi-5.5.7.tar.gz is the name being used:
tar xzf xi-5.5.7.tar.gz nagiosxi/nagiosxi/nagiosxi.sudoers --strip-components 2
Run all these commands to fix your /etc/sudoers file to make sure it has all the correct entries:
grep -v NAGIOSXI /etc/sudoers > /etc/sudoers.new
rm -f /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
After making these changes try and "Apply Configuration" from CCM and your problem should be resolved.
Large Amount Of Objects
Sometimes when creating a large amount of objects the apply configuration process is taking longer than expected and PHP may time out or exceed limits.
These are defined in the php.ini file, The location of the php.inifile differs depending on your operating system / version. The following command will determine the location:
find /etc -name php.ini
If there are multiple results then the one in the apache directory is the one that needs changing.
Edit /etc/php.ini and increase these values:
max_execution_time = 60
After making these changes you'll need to restart the Apache service using one of the commands below:
RHEL 6 | CentOS 6 | Oracle Linux 6
service httpd restart
RHEL 7 | CentOS 7 | Oracle Linux 7
systemctl restart httpd.service
service apache2 restart
Debian | Ubuntu 16/18
systemctl restart apache2.service
If you are still seeing the same problem, bump them up a bit more, and/or contact the Nagios Support team for assistance. These are explained in more detail in the following KB article:
When implementing SSL/TLS certificates on your Nagios XI server, the option use_https needs to be defined as true in the config.inc.php file.
Edit /usr/local/nagiosxi/html/config.inc.php and define the option as follows:
$cfg['use_https'] = true;
This step is included as part of the following documentation:
localhost Missing From /etc/hosts
The following KB article may also resolve your problem:
For any support related questions please visit the Nagios Support Forums at:
|Posted by: slansing - Tue, Jan 27, 2015 at 3:46 PM. This article has been viewed 6750 times.|
|Online URL: https://support.nagios.com/kb/article/nagios-xi-apply-configuration-never-completes-34.html|
Powered by PHPKB (Knowledge Base Software)