NCPA Wizard Memory Usage is incorrect

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

NCPA Wizard Memory Usage is incorrect

Post by GldRush98 »

The wizard doesn't seem to display the currently used values for memory correctly. I've noticed this for both a test windows system and a test linux system.
During a the config wizard, this is displayed:
Capture.PNG
But this is what that machine is currently using:
Capture2.PNG
Capture3.PNG
Not sure what numbers are being shown in the wizard, but it's not the current memory usage.
You do not have the required permissions to view the files attached to this post.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard Memory Usage is incorrect

Post by cdienger »

Thanks for bringing that to our attention. I will file a bug for this but in the meantime you can fix it by editing lines 721 and 753 in /usr/local/nagiosxi/html/includes/configwizards/ncpa/ncpa.inc.php from looking like this:

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $mem_data['used'][0] . '" class="form-control condensed">
and

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $swap_data['used'][0] . '" class="form-control condensed">
to using percent:

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $mem_data['percent'][0] . '" class="form-control condensed">
and

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $swap_data['percent'][0] . '" class="form-control condensed">
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: NCPA Wizard Memory Usage is incorrect

Post by GldRush98 »

I think you copied and pasted the same wrong lines ;)
And forgot to mention which file ;)

Fortunately it was enough to get me there.
Edit:
/usr/local/nagiosxi/html/includes/configwizards/ncpa/ncpa.inc.php
And change those lines to:

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $mem_data['percent'][0] . '" class="form-control condensed">
and

Code: Select all

<input type="text" style="width: 50px; height: 26px;" value="' . $swap_data['percent'][0] . '" class="form-control condensed">
Now it looks right! :geek:
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NCPA Wizard Memory Usage is incorrect

Post by cdienger »

Sure did! Corrected now. Must be low on caffeine... Glad you were able to sort it out!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked