Apply configuration Taking a long time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Apply configuration Taking a long time

Post by sujitt »

it is taking more than 3 minutes to apply configuration. This used to be an issue before in the previous version,



Thanks

sujith

System:

Nagios XI Version : 2014R1.5
gaatlp81u 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome is not installed
Apache Information

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Server Name: gaatlp81u.corp.aglrsc.com
Server Address: 10.7.9.91
Server Port: 80
Date/Time

PHP Timezone: America/New_York
PHP Time: Fri, 14 Jul 2017 16:29:17 -0400
System Time: Fri, 14 Jul 2017 16:29:17 -0400
Nagios XI Data

License ends in: NTOSNM

nagios (pid 24936) is running...
NPCD running (pid 24918).
ndo2db (pid 24908) is running...
CPU Load 15: 1.60
Total Hosts: 206
Total Services: 3334
Function 'get_base_uri' returns: http://gaatlp81u.corp.aglrsc.com/nagiosxi/
Function 'get_base_url' returns: http://gaatlp81u.corp.aglrsc.com/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://gaatlp81u.corp.aglrsc.com/nagios ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost

Running:
/bin/ping -c 3 localhost 2>&1
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.026 ms

--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.015/0.023/0.028/0.005 ms
Test wget To localhost

WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:
/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/
--2017-07-14 16:29:19-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: "/usr/local/nagiosxi/tmp/ccm_index.tmp"

0K ......... 1.30M=0.007s

2017-07-14 16:29:19 (1.30 MB/s) - "/usr/local/nagiosxi/tmp/ccm_index.tmp" saved [9666]
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Apply configuration Taking a long time

Post by dwhitfield »

If it's completing, which it appears to be, you may just need additional resources. Please see https://assets.nagios.com/downloads/nag ... ios-XI.pdf and https://assets.nagios.com/downloads/nag ... ements.pdf for guidance.

Also, in /etc/php.ini. please change the following to the listed numbers (unless the numbers are higher than these):

Code: Select all

    max_execution_time = 60
    max_input_time = 120
    memory_limit = 256M
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Re: Apply configuration Taking a long time

Post by sujitt »

Here are the current settings
max_execution_time = 1200
max_input_time = 1200
memory_limit = 2048M
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Apply configuration Taking a long time

Post by tgriep »

Can you login to the Nagios server as root, run the following commands and post the output?

Code: Select all

free
top -n 1
cd /usr/local/nagiosxi/scripts
su nagios
time ./reconfigure_nagios.sh
Thanks.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Re: Apply configuration Taking a long time

Post by sujitt »

Tasks: 235 total, 10 running, 224 sleeping, 0 stopped, 1 zombie
Cpu(s): 9.3%us, 16.5%sy, 0.0%ni, 73.9%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 7735940k total, 7118328k used, 617612k free, 125760k buffers
Swap: 2064376k total, 88116k used, 1976260k free, 5713364k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6782 nagios 20 0 219m 20m 7184 R 15.8 0.3 0:00.08 php
6783 nagios 20 0 219m 20m 7184 R 13.8 0.3 0:00.07 php
6785 nagios 20 0 219m 21m 7264 R 13.8 0.3 0:00.07 php
6786 nagios 20 0 219m 21m 7220 R 13.8 0.3 0:00.07 php
6789 nagios 20 0 219m 20m 7212 R 13.8 0.3 0:00.07 php
6790 nagios 20 0 219m 20m 7184 R 13.8 0.3 0:00.07 php
6791 nagios 20 0 217m 19m 7208 R 13.8 0.3 0:00.07 php
6788 nagios 20 0 217m 18m 7200 R 11.9 0.2 0:00.06 php
1425 mysql 20 0 2198m 34m 4560 S 2.0 0.5 2862:55 mysqld
5994 nagios 20 0 222m 29m 8064 R 2.0 0.4 0:00.17 php
1 root 20 0 19356 1092 880 S 0.0 0.0 0:48.52 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.04 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 5:23.61 migration/0



Total Warnings: 334
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: .done.
Starting nagios: done.

real 0m3.613s
user 0m0.546s
sys 0m0.204s


Looks like now it is working fine. I need to check if someone deleted any of the passive services
4 root 20 0 0 0 0 S 0.0 0.0 1:02.79 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
6 root RT 0 0 0 0 S 0.0 0.0 0:15.76 watchdog/0
7 root RT 0 0 0 0 S 0.0 0.0 3:49.27 migration/1
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Apply configuration Taking a long time

Post by tgriep »

The system is running low on memory and if it fills up, that would cause the Apply Configuration taking a long time.
Try increasing it and hopefully in the future, the slowdown will not happen.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Re: Apply configuration Taking a long time

Post by sujitt »

Thanks you can close this case.
bolson

Re: Apply configuration Taking a long time

Post by bolson »

Closing this topic as resolved.

Thank you for using the Nagios Support Forum.
Locked