NagiosXI 5.7.4 Slow query for hosts status
Posted: Fri Nov 27, 2020 6:59 am
Dear all,
I've already opened a ticket to the support team but I think is good to share infos with the community,
maybe someone else is having the same problem and can help me to solve mine.
On a newly installed RHEL 8.3 with NagiosXI 5.7.4 I've imported all the config from the production system (600 hosts - 33500 services).
All seem to work correctly unless the status page for the hosts.
After investigation I've found that the schema for the table objects in the nagios DB has been changed ad the index for the column object_id is not used by the query produced from the page, causing e high time in query resolution.
When you open the host status page the application starts a loop to retrieve information and execute n queries one for each hosts, this takes more the 0.6 sec, in my case 600 hosts * 0.6 sec = 6 minutes to complete the loop.... (it never completes the loop due to the httpd timout)
With an old schema where there were keys separeted for every columns it took 0.01 sec (6 sec at all)
Here attached the evidence of the query not using the index Do you have any suggestion?
Thanks.
I've already opened a ticket to the support team but I think is good to share infos with the community,
maybe someone else is having the same problem and can help me to solve mine.
On a newly installed RHEL 8.3 with NagiosXI 5.7.4 I've imported all the config from the production system (600 hosts - 33500 services).
All seem to work correctly unless the status page for the hosts.
After investigation I've found that the schema for the table objects in the nagios DB has been changed ad the index for the column object_id is not used by the query produced from the page, causing e high time in query resolution.
When you open the host status page the application starts a loop to retrieve information and execute n queries one for each hosts, this takes more the 0.6 sec, in my case 600 hosts * 0.6 sec = 6 minutes to complete the loop.... (it never completes the loop due to the httpd timout)
With an old schema where there were keys separeted for every columns it took 0.01 sec (6 sec at all)
Here attached the evidence of the query not using the index Do you have any suggestion?
Thanks.