Capacity Planning Report issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Capacity Planning Report issue

Post by lrnnetops »

Hi Team,

Please find below nagios XI server details.

Operating System - Centos 7
Nagios XI Version = 5.6.5
CPU core - 4
Memory - 16 GB

We are trying to automate capacity planning report monthly. We tried with below method.

1 - Manually executed capacity planning report for single host for 1 month. able to download & send report on mail. wkhtmltopdf took almost more than 10 minutes.

2 - Manually executed capacity planning report for single host for more than 1 month . Unable to download nor send report on mail. wkhtmltopdf took infinite time to run. Spike load on server. received mail but attached file in mail was corrupted but same time we checked & found "wkhtmltopdf" process was still running on the server. we had to kill process.

3 - 2 - Manually executed capacity planning report for single hostgroup for 1 month . Unable to download nor send report on mail. wkhtmltopdf took infinite time to run. Spike load on server. received mail but attached file in mail was corrupted, but same time we checked & found "wkhtmltopdf" process was still running on the server. we had to kill process.

Details of wkhtmltopdf & wkhtmltoimage as below

wkhtmltopdf --version
wkhtmltopdf 0.12.1.3 (with patched qt)

wkhtmltoimage --version
wkhtmltoimage 0.12.1.3 (with patched qt)

Please let us know fix for the issue we facing.

Regards,
Rohan
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Capacity Planning Report issue

Post by ssax »

Please attach your /etc/php.ini, we likely need to tweak some settings.

Please PM me a copy of your profile as well so we can check for other issues that could be affecting it, you can download it from Admin > System Profile > Download Profile button.

Thank you!
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Capacity Planning Report issue

Post by lrnnetops »

Hi ssax,

Please find attached php.ini file.
php.ini
We exported profile, but as per our security policy we wont be able to share all the details with you. Please let us know what details you want to check from profile details we will check with our security team & if possible we will share with you.

We have attached system info.
Nagios XI - System Info.txt
Regards,
Rohan
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Capacity Planning Report issue

Post by ssax »

Please edit your /etc/php.ini and change these:

Code: Select all

max_execution_time = 30
;max_input_vars = 1000
memory_limit = 128M
To these:

Code: Select all

max_execution_time = 900
max_input_vars = 50000
memory_limit = 1024M
Then restart apache and try again:

Code: Select all

service httpd restart
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Capacity Planning Report issue

Post by cdienger »

The output shows a corrupted table in the database and the php.ini memory limit is set to the default which we normally have to increase. Correct the database error following https://assets.nagios.com/downloads/nag ... tabase.pdf and increase the limits set in the php.ini per https://support.nagios.com/kb/article/n ... e-611.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Capacity Planning Report issue

Post by lrnnetops »

HI cdienger,

We have repaired the DB.
db-repair.jpg
Hi ssax,

We have made changes as recommended in php.ini but still we haven't seen any improvement in performance. it still having same delay.

Regards,
Rohan Talkar
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Capacity Planning Report issue

Post by ssax »

Try increasing your /etc/php.ini max_execution_time to an even higher value like 3600.

If you run this tail command (as root):

Code: Select all

tail -Fn0 /var/log/httpd/*error_log
Then replicate the capacity planning report issue, do you see any errors being output from the still running tail command?

What is the output of these commands?

Code: Select all

ps aux
sar
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Capacity Planning Report issue

Post by lrnnetops »

Hi ssax,

We have made the suggested changes in php.ini still we receiving PDF in mail as corrupted file.

Attached requested output (Apache error logs, ps aux & sar).
sys-output.txt
Please let us know how to fix this issue.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Capacity Planning Report issue

Post by ssax »

You have crashed DB tables:
Sep 15 09:30:20 XXXX ndo2db[2458]: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Please repair them:

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

I'm also seeing this:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php.ini on line 375 in Unknown on line 0
Edit your /etc/php.ini and change line 375 from this:

Code: Select all

#expose_php = On
To this:

Code: Select all

;expose_php = On

Code: Select all

service httpd restart
Then test again.
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Re: Capacity Planning Report issue

Post by lrnnetops »

Hi ssax,

As per suggestion we have corrected "/etc/php.ini" file => restarted apahe.

Performed DB repair with "sh /usr/local/nagiosxi/scripts/repair_databases.sh" command. attached output for db repair.
nagiosxi-db-repair-ouput.txt
We executed capacity planning report after that for 1 month on hostgroup having 16 hosts. below is the summary.

1 - Click on Email this report on 10:03 AM IST.
2 - Received mail with PDF file attached on 10:19 AM IST
3 - Checked PDF file it cupped.
4 - "wkhtmltopdf" process created for the task is still running on the server & occupied the server resources.
wkhtmltopdf_long-running_process.jpg
Provided solution did not worked.

We need fix on this on high priority as we have to share details with our management. please involve your dev team if required.

Regards,
Rohan
You do not have the required permissions to view the files attached to this post.
Locked