Nagios Core 4.1.1 Web interface slow/sluggish

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

Fairly new install, only monitoring 25 hosts, has been slow since install, but now looping back trying to speed it up.

It seems the time to first byte for /nagios and images can be as high as 5-7 seconds.

Has anyone else ran into this?

Running on
Ubuntu 14.04, 2 CPUs, 8 GB Memory.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by hsmith »

How was Core installed?
Former Nagios Employee.
me.
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

Compiled from source, I follows this guide...https://www.digitalocean.com/community/ ... untu-14-04
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by rkennedy »

This could be caused by a lot of different variables, can you run the following commands and post the output for us to take a look at?

Code: Select all

top
iostat
Additionally, how many service checks are you running on these 25 hosts? Are you using our included nagios plugins, or custom ones?
Former Nagios Employee
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

Server is barely loaded, sorry server is actually running 6GB of Memory.

I am doing a total of 116 checks, a few custom smtp checks, other checks are using the built in plugins. The interface was slow before I started adding checks.

Code: Select all

top - 15:07:47 up 40 days,  5:49,  3 users,  load average: 0.00, 0.01, 0.05
Tasks: 134 total,   1 running, 133 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.3 us,  0.2 sy,  0.0 ni, 99.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   6111836 total,  2196104 used,  3915732 free,   219076 buffers
KiB Swap:  1046524 total,        0 used,  1046524 free.  1643840 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1329 root      20   0  163640   7000   6164 S   0.3  0.1  60:57.74 vmtoolsd
15118 tdockst+  20   0   35876   3296   2756 R   0.3  0.1   0:00.10 top
16767 nagios    20   0   32332   4232   2872 S   0.3  0.1   0:12.34 nagios
    1 root      20   0   35572   4064   2704 S   0.0  0.1   0:06.31 init
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.22 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   0:19.73 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
    7 root      20   0       0      0      0 S   0.0  0.0   8:26.56 rcu_sched
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh
    9 root      20   0       0      0      0 S   0.0  0.0   6:37.74 rcuos/0
   10 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/0
   11 root      rt   0       0      0      0 S   0.0  0.0   0:26.08 migration/0
   12 root      rt   0       0      0      0 S   0.0  0.0   0:20.70 watchdog/0
   13 root      rt   0       0      0      0 S   0.0  0.0   0:14.60 watchdog/1
   14 root      rt   0       0      0      0 S   0.0  0.0   0:27.14 migration/1
   15 root      20   0       0      0      0 S   0.0  0.0   0:12.92 ksoftirqd/1
   17 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H
   18 root      20   0       0      0      0 S   0.0  0.0   3:55.05 rcuos/1
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcuob/1
   20 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 khelper
   21 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kdevtmpfs
   22 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 netns
   23 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 perf
   24 root      20   0       0      0      0 S   0.0  0.0   0:01.70 khungtaskd
   25 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 writeback
   26 root      25   5       0      0      0 S   0.0  0.0   0:00.00 ksmd
   27 root      39  19       0      0      0 S   0.0  0.0   0:52.30 khugepaged
   28 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 crypto
   29 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kintegrityd
   30 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 bioset
   31 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kblockd
   32 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 ata_sff
   33 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 md
   34 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 devfreq_wq
   38 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswapd0
   39 root      20   0       0      0      0 S   0.0  0.0   0:00.00 fsnotify_mark
   40 root      20   0       0      0      0 S   0.0  0.0   0:00.00 ecryptfs-kthrea
   52 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kthrotld
   53 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 acpi_thermal_pm
   54 root      20   0       0      0      0 S   0.0  0.0   0:00.00 scsi_eh_0
   55 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 scsi_tmf_0
   56 root      20   0       0      0      0 S   0.0  0.0   0:00.02 scsi_eh_1
   57 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 scsi_tmf_1
   62 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 ipv6_addrconf
   82 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 deferwq
   83 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 charger_manager
  131 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 mpt_poll_0

Code: Select all

iostat
Linux 3.19.0-28-generic (nagios01) 	11/03/2015 	_x86_64_	(2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.54    0.01    0.16    0.03    0.00   99.27

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               2.06         0.16        32.83     566823  114153472
Thanks!
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

I just removed all hosts but localhost (using only the default checks/plugins) and get the same results.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by Box293 »

Do you use a proxy server in your environment? If yes, is your browser configured to bypass the proxy server when accessing the Nagios server?

Are you seeing any errors in the httpd log?

Code: Select all

tail /var/log/httpd/error_log -n 100
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

Not going through a proxy server, only errors in error log are related to self signed ssl cert warnings.

Code: Select all

[Tue Nov 03 12:28:53.733262 2015] [core:notice] [pid 31988] AH00094: Command line: '/usr/sbin/apache2'
[Wed Nov 04 06:52:08.681899 2015] [mpm_prefork:notice] [pid 31988] AH00171: Graceful restart requested, doing restart
[Wed Nov 04 06:52:08.789463 2015] [ssl:warn] [pid 31988] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Nov 04 06:52:08.789504 2015] [ssl:warn] [pid 31988] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Wed Nov 04 06:52:08.789809 2015] [mpm_prefork:notice] [pid 31988] AH00163: Apache/2.4.7 (Ubuntu) mod_auth_kerb/5.4 PHP/5.5.9-1ubuntu4.13 OpenSSL/1.0.1f configured -- resuming normal operations
[Wed Nov 04 06:52:08.789831 2015] [core:notice] [pid 31988] AH00094: Command line: '/usr/sbin/apache2'
I did notice that sometimes if I hit refresh right after the page is fully loaded the page load very fast ~1 second load time, but quickly goes back to 5-9 second load time.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by jdalrymple »

I personally haven't seen that behavior at all. No sluggishness whatsoever on my CentOS7 + 4.1.1 system, and that includes functioning SSL security.

2 things to take a look at:

1) Top when you're loading a typically slow page
2) Firebug or Chrome debugger or something indicating what the browser is waiting on (Net panel in Firebug)

I wonder if some external links you can't reach (I know of none in Core) are slowing you down.
tylux
Posts: 7
Joined: Wed Sep 30, 2015 11:39 am

Re: Nagios Core 4.1.1 Web interface slow/sluggish

Post by tylux »

No errors in log, load never goes up on server, server is barely doing anything. This is just for the main page.

See attached image.

Thanks!
Attachments
Long time to first byte
Long time to first byte
Locked