Page 1 of 2

Capacity Planning Blank

Posted: Thu Jul 18, 2024 11:37 am
by wneville
Hello,

I have seen several posts about Capacity Planning reports appearing empty and I am having a similar issue. I have >1 year of data and am just trying to get anything to work so for now I have selected the 1 week option for Period.

My log (/usr/local/nagiosxi/var/components/capacityplanning.log) is also empty:

Code: Select all

ll /usr/local/nagiosxi/var/components/*log
-rw-rw-rw- 1 apache nagios 22582 Jul 18 10:32 /usr/local/nagiosxi/var/components/auditlog.log
-rwxrwxr-x 1 apache nagios    25 Feb 14  2022 /usr/local/nagiosxi/var/components/bpi.log
-rw-rw-r-- 1 apache nagios     0 Jan 21  2022 /usr/local/nagiosxi/var/components/capacityplanning.log
-rw-r--r-- 1 apache nagios 12370 Nov  9  2023 /usr/local/nagiosxi/var/components/scheduledbackups.log
Please let me know how I can troubleshoot this.

Thanks

Re: Capacity Planning Blank

Posted: Fri Jul 19, 2024 11:44 am
by sgardil
wneville wrote: Thu Jul 18, 2024 11:37 am Hello,

I have seen several posts about Capacity Planning reports appearing empty and I am having a similar issue. I have >1 year of data and am just trying to get anything to work so for now I have selected the 1 week option for Period.

My log (/usr/local/nagiosxi/var/components/capacityplanning.log) is also empty:

Code: Select all

ll /usr/local/nagiosxi/var/components/*log
-rw-rw-rw- 1 apache nagios 22582 Jul 18 10:32 /usr/local/nagiosxi/var/components/auditlog.log
-rwxrwxr-x 1 apache nagios    25 Feb 14  2022 /usr/local/nagiosxi/var/components/bpi.log
-rw-rw-r-- 1 apache nagios     0 Jan 21  2022 /usr/local/nagiosxi/var/components/capacityplanning.log
-rw-r--r-- 1 apache nagios 12370 Nov  9  2023 /usr/local/nagiosxi/var/components/scheduledbackups.log
Please let me know how I can troubleshoot this.

Thanks
Hey @wneville

Can you go to the capacity planning page and then check your php logs and let us know what you are seeing. Depending on your OS it will be in /var/log/{php-fpm, httpd, or apachex}.

Re: Capacity Planning Blank

Posted: Mon Jul 22, 2024 12:11 pm
by wneville
This log entry shows up when I run the report:

Code: Select all

[22-Jul-2024 13:08:30] WARNING: [pool www] child 2622667 said into stderr: "/usr/bin/env: 'python': No such file or directory"

Re: Capacity Planning Blank

Posted: Mon Jul 22, 2024 1:59 pm
by cnorell
wneville,

It looks like either Python is not currently installed, or there is no symlink to the interpreter in /usr/bin/env/. The package name can change based on distribution, but you will use yum for RedHat based distributions, or apt-get for debian based distributions.

Alternatively, you can attempt to run whereis <python_package_name> to get the install location, then create a symlink in /usr/bin/env/ with a command similar to:

Code: Select all

sudo ln -s <python_interpreter_location> /usr/bin/env/
If you have any questions, let us know.

Best Regards,

Cory Norell

Re: Capacity Planning Blank

Posted: Tue Jul 23, 2024 8:17 am
by wneville
What is being called when I run the capacity planning report? Can I edit that to look for the correct python directory?

Re: Capacity Planning Blank

Posted: Tue Jul 23, 2024 8:47 am
by wneville
Also:

Code: Select all

ln -s /usr/bin/python3 /usr/bin/env
ln: failed to create symbolic link '/usr/bin/env': File exists


ln -s /usr/bin/python3 /usr/bin/env/
ln: target '/usr/bin/env/' is not a directory: Not a directory

Re: Capacity Planning Blank

Posted: Tue Jul 23, 2024 1:35 pm
by jmichaelson
The scripts themselves are looking to /usr/bin/env python for the python interpreter. What do you get for output when you run that? Also try as a followup question the same thing but for python3.

Re: Capacity Planning Blank

Posted: Wed Jul 24, 2024 12:59 pm
by wneville
Python3 is found but but python is not. That kind of relates back to my earlier question about where the capacity planning report is originating, if it is a script somewhere i could just change the shebang line to /usr/bin/env python3

Re: Capacity Planning Blank

Posted: Wed Jul 24, 2024 4:22 pm
by ssunga
Try creating a symlink for python that points to python3:

sudo ln -s /usr/bin/python3 /usr/bin/python

Re: Capacity Planning Blank

Posted: Thu Jul 25, 2024 8:20 am
by wneville
This fixed the issue. Thanks!