Page 1 of 1
wkhtmltopdf
Posted: Mon May 17, 2021 4:10 pm
by matson-itops
when generating reports, this spikes load on the server
has anyone seen this and who do they get around it?
I have a very reasonable 3 scheduled reports running on nagios 5.8.1
for a reasonable 100 servers
Re: wkhtmltopdf
Posted: Tue May 18, 2021 1:28 pm
by dchurch
Has the report generation always been slow, or has it been getting slower over time?
What's the output from the following command?
Code: Select all
mysql -uroot -pnagiosxi --table <<< "select * from (select table_name, round(((data_length + index_length) / 1024 / 1024), 2) as sz from information_schema.tables where table_schema like 'nagios%') as x order by x.sz;"
On long-running systems with mucho checks, the database can get bogged down with excessive "paper trail" type data and the software's database queries aren't properly utilizing indexes. It just needs better thresholds to get performance back where it should be:
Open Admin => Performance Settings, then click on the Databases tab. Change the following settings:
- Max Log Entries Age: change to 10
- Max Audit Log Age: change to 10
- Max State History Age: change to 30
It might take up to a day for the "cleaner" process to run depending on how your system is configured, but it'll eventually run and clean your database of all these for you.
See this document:
Nagios XI Database Optimization