Page 1 of 1

NLS: Apply configuration process does not complete

Posted: Mon Jun 10, 2019 1:19 pm
by mrABB
Within the NLS web console:
I am experiencing issues with applying the configuration whenever I have the amount of code that makes the apply configuration process take more than 60 seconds. In my case, it happens when my configuration is about 1014 lines containing about 42861 chars. The configuration verifies okay, but when applying, the “running” status goes on forever. If I make the configuration a few chars shorter, the applying process completes in about 59,9 sec. If I then add a few “#” signs to the configuration, it won’t apply. Again, the apply process spins around forever. Hence, I’m wondering if there could be a bug in your code for the “Apply Configuration” function having something to do with the 60 seconds.

Re: NLS: Apply configuration process does not complete

Posted: Mon Jun 10, 2019 3:48 pm
by npolovenko
Hello, @mrABB. Let's increase the settings in your /etc/php.ini file. Double the memory_limit value, set max_execution_time to 300, max_input_time to 300 as well. Save the file and restart apache with:

Code: Select all

service httpd restart
This KB article is for XI but you can use it a guide for the LS as well.
https://support.nagios.com/kb/article/n ... e-611.html

Re: NLS: Apply configuration process does not complete

Posted: Wed Jun 19, 2019 6:08 am
by mrABB
Hi npolovenko.
Thanks for the tip. Tested changing the values you suggested without any luck. Still the same issue.
Also looked through the guide you referred to:
https://support.nagios.com/kb/article/n ... e-611.html
I do not get any php error messages, hence I don't believe the issue is related to php settings.

Any other suggestions to why the configuration won’t apply?

Running Nagios 2.0.7 on rhel 7.6

Re: NLS: Apply configuration process does not complete

Posted: Wed Jun 19, 2019 4:55 pm
by cdienger
I'd like to take a look at a configuration that fails. Go to Admin > Global > Global Config > All Files Combined.

Try tailing the Apache logs while it fails:

Code: Select all

tail -f /var/log/httpd/*
The logstash or elasticsearch logs may also have something:

Code: Select all

tail -f /var/log/logstash/logstash.log
tail -f /var/log/elasticsearch/*
Also, it may be useful to run the following while trying to apply configuration

Code: Select all

tail -f /usr/local/nagioslogserver/var/jobs.log