Nagios XI web interface slow
Posted: Tue Jan 02, 2018 7:46 am
Hi , It's a new year so I thought I would have another attempt at getting some help making our nagios server actually load pages in a timely manner....at the moment and of the Views pages take around 1 minute to load.
I spent a long time trying to fix this with nagios support about a year or more ago.. but got nowhere - so thought I would try again!
looking at top the httpd process is pinned at 100% cpu every time a page is loaded.
The server is a VM has 16GB memory and 4 CPU cores , SAN storage array - all flash, IO wait isnt the issue.
The server is only running about 1500 checks...
For example:
top - 12:35:18 up 11 days, 1:13, 1 user, load average: 1.88, 1.78, 1.76
Tasks: 269 total, 3 running, 265 sleeping, 0 stopped, 1 zombie
Cpu(s): 56.7%us, 2.8%sy, 0.0%ni, 38.0%id, 2.4%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 16459032k total, 15096724k used, 1362308k free, 524656k buffers
Swap: 2097148k total, 38796k used, 2058352k free, 3445168k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26719 apache 20 0 1308m 830m 17m R 99.7 5.2 3:09.46 httpd
18111 apache 20 0 1514m 1.0g 18m R 99.1 6.5 5:19.91 httpd
17964 nagios 20 0 109m 72m 1512 S 13.6 0.4 1:55.33 nagios
65496 nagios 20 0 24380 5248 1748 S 1.7 0.0 0:00.05 snmpget
17976 nagios 20 0 63132 2332 1032 S 1.0 0.0 1:22.86 ndo2db
47 root 20 0 0 0 0 S 0.3 0.0 0:38.44 kblockd/1
1595 root 20 0 0 0 0 S 0.3 0.0 6:19.50 flush-253:4
4831 mysql 20 0 2189m 51m 6068 S 0.3 0.3 3:25.69 mysqld
17968 nagios 20 0 10156 1136 688 S 0.3 0.0 0:00.54 nagios
65119 nagios 20 0 327m 33m 8488 S 0.3 0.2 0:00.15 php
65179 postgres 20 0 212m 6956 4480 S 0.3 0.0 0:00.02 postmaster
1 root 20 0 33664 1380 1184 S 0.0 0.0 0:07.28 init
When I enable debugging mode in firefox and look at how long its taking to load each bit of the page its getting stuck for about 20-30 seconds on this url - http://exvnagiosxiprd01/nagiosxi/ajaxhe ... 14ecb09f8d
And then stuck for another 20-30 seconds on this url - http://exvnagiosxiprd01/nagiosxi/ajaxhe ... 14ecb09f8d
I've tried SQL repair several times - it doesnt fix it.
Also tried postgres vacuum, increasing the number of SQL connections , adding RAMdisk, php op caching etc etc..
Saw another forum post that thought it might be dns related so added the entry of my pc to the hosts file on the server and restarted it - that didnt work either..
It's got to be something wrong with the apache config - why else would it be hogging 100% cpu ... I have no idea what though...
I spent a long time trying to fix this with nagios support about a year or more ago.. but got nowhere - so thought I would try again!
looking at top the httpd process is pinned at 100% cpu every time a page is loaded.
The server is a VM has 16GB memory and 4 CPU cores , SAN storage array - all flash, IO wait isnt the issue.
The server is only running about 1500 checks...
For example:
top - 12:35:18 up 11 days, 1:13, 1 user, load average: 1.88, 1.78, 1.76
Tasks: 269 total, 3 running, 265 sleeping, 0 stopped, 1 zombie
Cpu(s): 56.7%us, 2.8%sy, 0.0%ni, 38.0%id, 2.4%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 16459032k total, 15096724k used, 1362308k free, 524656k buffers
Swap: 2097148k total, 38796k used, 2058352k free, 3445168k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26719 apache 20 0 1308m 830m 17m R 99.7 5.2 3:09.46 httpd
18111 apache 20 0 1514m 1.0g 18m R 99.1 6.5 5:19.91 httpd
17964 nagios 20 0 109m 72m 1512 S 13.6 0.4 1:55.33 nagios
65496 nagios 20 0 24380 5248 1748 S 1.7 0.0 0:00.05 snmpget
17976 nagios 20 0 63132 2332 1032 S 1.0 0.0 1:22.86 ndo2db
47 root 20 0 0 0 0 S 0.3 0.0 0:38.44 kblockd/1
1595 root 20 0 0 0 0 S 0.3 0.0 6:19.50 flush-253:4
4831 mysql 20 0 2189m 51m 6068 S 0.3 0.3 3:25.69 mysqld
17968 nagios 20 0 10156 1136 688 S 0.3 0.0 0:00.54 nagios
65119 nagios 20 0 327m 33m 8488 S 0.3 0.2 0:00.15 php
65179 postgres 20 0 212m 6956 4480 S 0.3 0.0 0:00.02 postmaster
1 root 20 0 33664 1380 1184 S 0.0 0.0 0:07.28 init
When I enable debugging mode in firefox and look at how long its taking to load each bit of the page its getting stuck for about 20-30 seconds on this url - http://exvnagiosxiprd01/nagiosxi/ajaxhe ... 14ecb09f8d
And then stuck for another 20-30 seconds on this url - http://exvnagiosxiprd01/nagiosxi/ajaxhe ... 14ecb09f8d
I've tried SQL repair several times - it doesnt fix it.
Also tried postgres vacuum, increasing the number of SQL connections , adding RAMdisk, php op caching etc etc..
Saw another forum post that thought it might be dns related so added the entry of my pc to the hosts file on the server and restarted it - that didnt work either..
It's got to be something wrong with the apache config - why else would it be hogging 100% cpu ... I have no idea what though...