nagios slow when login

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

nagios slow when login

Post by s.wiki »

Hi,
I am currently monitoring around 1k+ host and 5k service.
When i login nagiosadmin it takes around 20sec to login
I have AD user imported.

Kindly assist. Thanks alot
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: nagios slow when login

Post by dwhitfield »

I think this will help out: https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: nagios slow when login

Post by s.wiki »

dwhitfield wrote:I think this will help out: https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Hi, i have sent you the systemprofile via PM.

I have read before the maximizing performance nagiosxi, should i implement all of them for this issue?

Thanks
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: nagios slow when login

Post by dwhitfield »

s.wiki wrote:, should i implement all of them for this issue?
It's hard to say. It really depends on if your disks are faster than your network. If you are on an SSD, then they probably are. If you offload your db to a VM cluster on the same physical disks, then the offloading is not likely to help.

It also depends on what is going on on the system at the time you log in.

If I were you, the first thing I would start with is the ramdisk and see if you see any improvement. After that, I'd go to any non-critical services that are being monitored and increase the check interval. Fewer checks, means better performance.

You also have some database issues which may be causing some problems. Probably, you should start a new thread for the database issues though. I'm seeing several of the following:

Code: Select all

May 24 14:24:49 localhost ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: nagios slow when login

Post by s.wiki »

dwhitfield wrote:
s.wiki wrote:, should i implement all of them for this issue?
It's hard to say. It really depends on if your disks are faster than your network. If you are on an SSD, then they probably are. If you offload your db to a VM cluster on the same physical disks, then the offloading is not likely to help.

It also depends on what is going on on the system at the time you log in.

If I were you, the first thing I would start with is the ramdisk and see if you see any improvement. After that, I'd go to any non-critical services that are being monitored and increase the check interval. Fewer checks, means better performance.

You also have some database issues which may be causing some problems. Probably, you should start a new thread for the database issues though. I'm seeing several of the following:

Code: Select all

May 24 14:24:49 localhost ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'

Hi ,
Thanks for your reply.
I have configured the ramdisk and repair the databases.
Disable auto-running on performance setting page.
It is still the same ~20 second. I have 2 worker + nagios server so it is 3 servers in total. So the load should not be the problem (i guess).

Currently not using ssd, and offloading db to another VM will be using the same exsi host and same datastore. However this is too much work and i would prefer this to be the last option.

I have tried to login using nagioscore. it login almost instantly.As for nagiosxi, the webpage speed is quite OK, it is just the login takes up to 20seconds.
Is there anywhere i should look for?
Thank you for your help :oops:

Thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: nagios slow when login

Post by tgriep »

Lets increase the memory and timeout values that PHP uses and see if that helps the performance while logging in as the nagiosadmin account.
Edit the /etc/php.ini file and change the following from

Code: Select all

max_execution_time = 30
max_input_time = 60
memory_limit = 128M
to

Code: Select all

max_execution_time = 60
max_input_time = 120
memory_limit = 512M
Then add this to the bottom of that file

Code: Select all

max_input_vars=5000
Save the file and restart Apache for the changes to take affect.

Code: Select all

service httpd restart
Try that and see if it decreases the login time to the GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: nagios slow when login

Post by s.wiki »

tgriep wrote:Lets increase the memory and timeout values that PHP uses and see if that helps the performance while logging in as the nagiosadmin account.
Edit the /etc/php.ini file and change the following from

Code: Select all

max_execution_time = 30
max_input_time = 60
memory_limit = 128M
to

Code: Select all

max_execution_time = 60
max_input_time = 120
memory_limit = 512M
Then add this to the bottom of that file

Code: Select all

max_input_vars=5000
Save the file and restart Apache for the changes to take affect.

Code: Select all

service httpd restart
Try that and see if it decreases the login time to the GUI.
Hi ,
I have applied the configuration above , it login still takes around 20sec. Is there anywhere i can look for? do you need some of my apache logs?

THanks
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: nagios slow when login

Post by s.wiki »

i have this error message everytime i login

[error] [client x.x.x.x] name lookup timed out, referer: https://x.x.x.x/nagiosxi/login.php
after multiple attempt to disable /etc/hosts OR /etc/resolv.conf ..finally i found out DNS is the rootcause. but i still need the DNS for my ad/ldap users.

could this because my ipaddress/hostname is not register to the DNS server?

EDIT:

Code: Select all

[root@imsvm conf.d]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.248.175 for ServerName
                                                           [  OK  ]
You have mail in /var/spool/mail/root
[root@imsvm conf.d]# nslookup imsvm
Server:         x.x.x.x
Address:        x.x.x.x#53

Name:   imsvm.abc.bank.my
Address: 192.168.248.175

[root@imsvm conf.d]# hostname -f
imsvm.abc.bank.my
I have add my server into the dns. and now my servername can be resolved. however the httpd still not recognize it.
Kindly assist
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: nagios slow when login

Post by tgriep »

First thing, if the Vagios server's FQDN is not setup on your DNS server, add it to DNS or add an entry in the /etc/hosts file like the example below

Code: Select all

192.168.248.175 imsvm.abc.bank.my imsvm
To resolve this message

Code: Select all

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.248.175 for ServerName
You can add the FQDN to the Apache main configuration file.
Edit the /etc/httpd/conf/httpd.conf file and find the following line and change it from

Code: Select all

#ServerName www.example.com:80
to

Code: Select all

ServerName imsvm.abc.bank.my
Save the file and restart apache by running

Code: Select all

service httpd restart
That way, the Apache Server will know the name at start up but I think the changes to the /etc/hosts file should fix this as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
s.wiki
Posts: 82
Joined: Sat Mar 04, 2017 11:02 am

Re: nagios slow when login

Post by s.wiki »

tgriep wrote:First thing, if the Vagios server's FQDN is not setup on your DNS server, add it to DNS or add an entry in the /etc/hosts file like the example below

Code: Select all

192.168.248.175 imsvm.abc.bank.my imsvm
To resolve this message

Code: Select all

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.248.175 for ServerName
You can add the FQDN to the Apache main configuration file.
Edit the /etc/httpd/conf/httpd.conf file and find the following line and change it from

Code: Select all

#ServerName www.example.com:80
to

Code: Select all

ServerName imsvm.abc.bank.my
Save the file and restart apache by running

Code: Select all

service httpd restart
That way, the Apache Server will know the name at start up but I think the changes to the /etc/hosts file should fix this as well.
The DNS and nagios is not the same server.
I have configured the ServerName ims.abc.bank.my, the error message no more,but the problem is still there

Currently i have commented out my host entry in /etc/hosts as my DNS is working
However i have tried uncommented my host in /etc/hosts, and the slow 20sec problem is still there.Unless i commented my nameserver in /etc/resolv.conf

I have tried login my nagiosxi web using
ip address.
hostname
fqdn.

all have the same error : name lookup timed out, referer
may i know is there anyother way i can look for(other than disable dns because i need to use it)

Thanks,
Locked