Page 1 of 3

Need advice about Dash speed...

Posted: Mon Dec 13, 2021 9:16 am
by BIB
Hello.

we currently have a dash problem that slows down a lot when we have more than 5 (for example) acknownledge hosts. Every time Dash needs to freshen up, he needs at least 3 times more time. Is there a possibility that the problem is somewhere in the configuration? I know there may be a solution to deactivate these hosts but the question is whether it can be done without deactivating the hosts?

BR,
BIB.

Re: Need advice about Dash speed...

Posted: Mon Dec 13, 2021 6:45 pm
by ssax
Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.

Additionally, please send the output of these commands:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the first command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
This next command may fail, that's okay, not all systems run postgresql, send the output anyways:

Code: Select all

echo "SELECT relname as Table, pg_size_pretty(pg_total_relation_size(relid)) As Size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as ExternalSize FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;" | psql nagiosxi nagiosxi

Re: Need advice about Dash speed...

Posted: Tue Dec 14, 2021 2:35 am
by BIB
Hello ssax.

Let me explain the situation first.
After migrating Nagios XI to a new server (more precisely, I migrated two servers in different locations and both have the same problem, both are on the same versions of OS and Nagios XI), the new server runs on CentOS 7 but the Nagios XI version remains on the old one, more precisely 5.7.4. The plan this week is to do a conversion of one of the databases from PostgreSQL to MySQL and to upgrade Nagios XI to the latest version. Now, whether it will be a conversion first upgrade or an upgrade then conversion, maybe you should recommend me the right steps.
Furthermore, this problem with the speed of display on Dash has been noticed before, so the hosts who had acknowledge, Dash was very slow. Attached you have the output of both commands (on both servers), I'm sending you profile.zip to PM and the current state of DB types on both servers, as far as I can see from the file is:
[root@nagios-bgd ~]# grep dbtype /usr/local/nagiosxi/html/config.inc.php
$cfg['dbtype']=''; // this setting is no longer used - use settings below
"dbtype" => 'pgsql',
"dbtype" => 'mysql',
"dbtype" => 'mysql',
[root@nagios-prm ~]# grep dbtype /usr/local/nagiosxi/html/config.inc.php
$cfg['dbtype']=''; // this setting is no longer used - use settings below
"dbtype" => 'pgsql',
"dbtype" => 'mysql',
"dbtype" => 'mysql',
Please advice.
BR,
BIB.

Re: Need advice about Dash speed...

Posted: Tue Dec 14, 2021 7:25 pm
by ssax
On nagios-prm, what is the output of this command?

Code: Select all

nslookup nagios-prm
On nagios-bgd, what is the output of this command?

Code: Select all

nslookup nagios-bgd

I would upgrade first but it doesn't really matter:

https://assets.nagios.com/downloads/nag ... ctions.pdf

Since you're on EL7 with Postgresql V9+ now, make sure you've done this:

https://support.nagios.com/kb/article/n ... r-754.html

You can follow this guide for the postgresql to mysql steps:

https://support.nagios.com/kb/article.php?id=560

If you need further help with either of those tasks please create a new topics for them (each unrelated issue should have it's own topic, this is requested by policy) and reserve this one for the dash speed issue.

Re: Need advice about Dash speed...

Posted: Wed Dec 15, 2021 1:40 am
by BIB
Thank you ssax.

Outputs of nslookup are:
[root@nagios-bgd ~]# nslookup nagios-bgd
Server: 10.35.170.22
Address: 10.35.170.22#53

Name: nagios-bgd.deltabank.co.yu
Address: 10.35.101.22

[root@nagios-bgd ~]# nslookup nagios-prm
Server: 10.35.170.22
Address: 10.35.170.22#53

Name: nagios-prm.deltabank.co.yu
Address: 10.34.2.100
[root@nagios-prm ~]# nslookup nagios-prm
Server: 10.34.2.11
Address: 10.34.2.11#53

Name: nagios-prm.deltabank.co.yu
Address: 10.34.2.100

[root@nagios-prm ~]# nslookup nagios-bgd
Server: 10.34.2.11
Address: 10.34.2.11#53

Name: nagios-bgd.deltabank.co.yu
Address: 10.35.101.22
Done with PostgreSQL reconfiguration.
Did you found something else on profiles files?

For information about Dash speed, now there are some services in problems (because of Exchange patching),but Dash is fine.

Re: Need advice about Dash speed...

Posted: Wed Dec 15, 2021 2:31 pm
by ssax
Is Admin > System Settings using DNS for the Program URL? Based on the profiles it looks like they are, if that's the case add the info to your /etc/wgetrc on the no_proxy setting:

Code: Select all

no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,yourdnsname,yourdnsname.fqdn.com
That should stop wget from trying to use the proxy when working internally, adapted from here:
- I found that IP addresses do not work, only DNS names do for no_proxy to work

https://support.nagios.com/kb/article.php?id=147

What is the output of this command on both systems?

Code: Select all

grep memory_limit /etc/php.ini
One thing you can do is go to Admin > Performance Settings > Dashlets tab and adjust the Dashlet Refresh Multiplier to 2000 or higher. That can alleviate some of the performance impact when other users are sitting on the pages with auto-refresh enabled on them.

Another thing I see is that you have you have multiple ad/ldap components installed (which will need to be remediated as they conflict/can cause slowness).

You will need to do this:

First, set nagiosadmin to a local account (if it isn't already) and logout/log back into the system with it.

Then, disable active directory authentication in Admin > Manage Components > Active Directory > Settings, double check Admin > Manage Components > LDAP Auth > Settings is disabled as well.

Then setup the new component (copying the info from the old) in Admin > LDAP / AD Integration.
-- See below if you have questions

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

See here as well if you have issues:

https://support.nagios.com/kb/article/a ... n-600.html

Once you've done that and tested login functionality you can run these commands to get rid of the old components:

Code: Select all

rm -rf /usr/local/nagiosxi/html/includes/components/active_directory
rm -rf /usr/local/nagiosxi/html/includes/components/ldapauth

Re: Need advice about Dash speed...

Posted: Fri Dec 17, 2021 10:01 am
by BIB
Hello ssax.

Thank you for the advice.
I made a change to / etc / wgetrc and made change to "Dashlet Refresh Multiplier". For now, no shift in the speed of Dash.

For memory limit:
[root@nagios-bgd /]# grep memory_limit /etc/php.ini
memory_limit = 256M
[root@nagios-prm ~]# grep memory_limit /etc/php.ini
memory_limit = 256M
For LDAP Auth, I'm a little confused but I need help.
I foy say "multiple ad/ldap components installed", you mean that it is configured LDAP on Admin / LDAP/AD Integration and in Active Directory Integration components in Manage Components?

Screenshots in attachment.

Than, AD integration shouldn't be there?


BIB

Re: Need advice about Dash speed...

Posted: Fri Dec 17, 2021 4:35 pm
by ssax
Edit the /etc/php.ini and make sure these are set:

Code: Select all

max_execution_time=300
max_input_vars=50000
memory_limit=1024M
Then restart apache:

Code: Select all

systemctl restart httpd
See if that helps.

Old components (pre-XI 5.5):

Code: Select all

/usr/local/nagiosxi/html/includes/components/active_directory
/usr/local/nagiosxi/html/includes/components/ldapauth
Those should not exist on XI 5.5+, it is a single component now that does both:

Code: Select all

/usr/local/nagiosxi/html/includes/components/ldap_ad_integration
But you need to migrate to it following the previous steps because it's setup differently.

Re: Need advice about Dash speed...

Posted: Sat Dec 18, 2021 4:52 pm
by BIB
Hello ssax.

Thank you for the advice.
I made a change to /etc/php.ini but I think there was some 10% acceleration, so some fraction of the acceleration, imperceptibly almost.

On both servers, in the /usr/local/nagiosxi/html/includes/components folder, I see all three components and as I understood from the previous post, I need to do the following:
-create nagiosadmin account (in /etc/passwd I don't see that account as a local account),

### QUESTION: Do I need make him a member of root group or some administrative group (wheel maybe)? This is a bit unclear to me because why create a user account when we already have a root user account.

-login with nagiosadmin to shell (or GUI, an explanation is desirable)
-disable AD intregration in two places:
1. Admin > Manage Components > Active Directory > Settings
2. Admin > Manage Components > LDAP Auth > Settings

### QUESTION: probably no one will be able to connect to the nagios GUI but what happens to user accounts that are authenticated to AD? Will they need to recreate afterwards

-and recreate LDAP on Admin > LDAP / AD Integration again?

On the test server, before this "fix" I saw that the number of associated users is 50 and after this "fix", 0. When I entered the configuration of the first user, I just did an update and the number of associated users is 1. Is action needed let here in terms of user updates?

And one more piece of information. It seems that only nagios-prm is configured (enabled) LDAP integration in Admin> Manage Components> Active Directory> Settings. There is a configuration on nagios-bgd but it is not enabled. Is it better to reconfigure both servers so that the section Admin> Manage Components> Active Directory> Settings is disabled?

Best regards,
BIB.

Re: Need advice about Dash speed...

Posted: Mon Dec 20, 2021 11:20 am
by ssax
There is no need to create an OS level nagiosadmin account, the nagiosadmin account I'm referring to is when you're logging into the XI web interface.
What happens to user accounts that are authenticated to AD? Will they need to recreate afterwards?
You will need to associate the users to the auth server and then they should be able to login with their AD credentials. The new component requires you have an XI user associated to it.
When I entered the configuration of the first user, I just did an update and the number of associated users is 1. Is action needed let here in terms of user updates?
Yes, you need to associate the XI users to the new auth server that you've setup (which increases that count as you found).

QUESTION: probably no one will be able to connect to the nagios GUI but what happens to user accounts that are authenticated to AD?
Is it better to reconfigure both servers so that the section Admin> Manage Components> Active Directory> Settings is disabled?
If the systems are running XI 5.5+, you should follow the steps to remove the old components on both because they shouldn't exist.

First, set nagiosadmin to a local account (if it isn't already) and logout/log back into the system with it.
- Just go to Admin > Manage Users in the XI web interface and make sure the nagiosadmin user is a local account (not AD/LDAP linked)
- Then login as nagiosadmin in the XI web interface

Then, disable active directory authentication in Admin > Manage Components > Active Directory > Settings, double check Admin > Manage Components > LDAP Auth > Settings is disabled as well.

Then setup the new component (copying the info from the old) in Admin > LDAP / AD Integration.
-- See below if you have questions

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

See here as well if you have issues:

https://support.nagios.com/kb/article/a ... n-600.html

Once you've done that and tested login functionality you can run these commands to get rid of the old components:

Code: Select all

rm -rf /usr/local/nagiosxi/html/includes/components/active_directory
rm -rf /usr/local/nagiosxi/html/includes/components/ldapauth