Capacity Planning Blank

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Capacity Planning Blank

Post 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
sgardil
Posts: 355
Joined: Wed Aug 09, 2023 9:58 am

Re: Capacity Planning Blank

Post 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}.
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: Capacity Planning Blank

Post 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"
cnorell
Developer
Posts: 141
Joined: Mon Nov 27, 2017 3:08 pm

Re: Capacity Planning Blank

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: Capacity Planning Blank

Post by wneville »

What is being called when I run the capacity planning report? Can I edit that to look for the correct python directory?
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: Capacity Planning Blank

Post 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
User avatar
jmichaelson
Posts: 383
Joined: Wed Aug 23, 2023 1:02 pm

Re: Capacity Planning Blank

Post 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.
Please let us know if you have any other questions or concerns.

-Jason
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: Capacity Planning Blank

Post 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
ssunga
Posts: 72
Joined: Wed Aug 09, 2023 10:38 am

Re: Capacity Planning Blank

Post by ssunga »

Try creating a symlink for python that points to python3:

sudo ln -s /usr/bin/python3 /usr/bin/python
wneville
Posts: 113
Joined: Wed Mar 31, 2021 3:35 pm

Re: Capacity Planning Blank

Post by wneville »

This fixed the issue. Thanks!
Locked