[Problem] Linux Machine Memory Usage.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
igsadmin
Posts: 64
Joined: Wed Mar 26, 2014 5:09 am

[Problem] Linux Machine Memory Usage.

Post by igsadmin »

Dear Guys,

I would like to check with you guys, the Linux machine memory usage is showing memory buffer instead of the used memory in Nagios XI.
Can we monitor the total memory size and used memory size instead of memory buffers in Linux Machine?

The OS consist of 48GB memory.

Kindly please find the screenshot from the attachment below,
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: [Problem] Linux Machine Memory Usage.

Post by tmcdonald »

Can you post the configuration options for the Memory Usage check? In the Fore Config Manager, just open the service and screenshot the first tab. Make sure to censor out any potentially sensitive info.
Former Nagios employee
igsadmin
Posts: 64
Joined: Wed Mar 26, 2014 5:09 am

Re: [Problem] Linux Machine Memory Usage.

Post by igsadmin »

tmcdonald wrote:Can you post the configuration options for the Memory Usage check? In the Fore Config Manager, just open the service and screenshot the first tab. Make sure to censor out any potentially sensitive info.
Hi, donald.. here I attached the screenshot of the services config.. Is this the one you requested?
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: [Problem] Linux Machine Memory Usage.

Post by lmiltchev »

You can try replacing the 'Memory' in the $ARG1$ field with "^Virtual memory$". Is this working better for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
igsadmin
Posts: 64
Joined: Wed Mar 26, 2014 5:09 am

Re: [Problem] Linux Machine Memory Usage.

Post by igsadmin »

lmiltchev wrote:You can try replacing the 'Memory' in the $ARG1$ field with "^Virtual memory$". Is this working better for you?
Hi, I'm getting error after I changed to "Virtual Memory"
COMMAND: /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 10.200.65.148 -C <community> --v2c -m 'Virtual Memory' -w 90 -c 95 -f
OUTPUT: Unknown storage : Virtual Memory : ERROR
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: [Problem] Linux Machine Memory Usage.

Post by sreinhardt »

I do believe Virtual Memory is supposed to be one word "VirtualMemory". Also could you try an snmpwalk against the device like so:

Code: Select all

snmpwalk -v 2c -C [Community string] [hostname\address] 1.3.6.1.2.1.25.2.1
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
igsadmin
Posts: 64
Joined: Wed Mar 26, 2014 5:09 am

Re: [Problem] Linux Machine Memory Usage.

Post by igsadmin »

Hi Guys,

I managed to get the solution from Nagios XI Support via email.
Here I share the solution,
The plugin: check_snmp_storage.pl has an option for checking physical ram:

./check_snmp_storage.pl -H localhost -C public -2 -m 'Physical' -w 90 -c 95

Just change:

-m 'Memory'

To:

-m 'Physical'
You can change the wizard defaults by editing the file:

/usr/local/nagiosxi/html/includes/configwizards/linux_snmp/linux_snmp.inc.php

Around Line #620, you will find the following block of text:

case "memory":
$objs[]=array(
"type" => OBJECTTYPE_SERVICE,
"host_name" => $hostname,
"service_description" => "Memory Usage",
"use" => "xiwizard_linuxsnmp_storage",
"check_command" => "check_xi_service_snmp_linux_storage!".$snmpargs." -m 'Memory' -w ".$serviceargs["memory_warning"]." -c ".$serviceargs["memory_critical"]." -f",
"_xiwizard" => $wizard_name,
);
break;

Change:

"check_command" => "check_xi_service_snmp_linux_storage!".$snmpargs." -m 'Memory' -w ".$serviceargs["memory_warning"]." -c ".$serviceargs["memory_critical"]." -f",

To:

"check_command" => "check_xi_service_snmp_linux_storage!".$snmpargs." -m 'Physical' -w ".$serviceargs["memory_warning"]." -c ".$serviceargs["memory_critical"]." -f",

Essentially, you are just changing -m "Memory" to -m "Physical".

Now all new checks generated by the wizard will check physical.

Save out and rerun the wizard.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: [Problem] Linux Machine Memory Usage.

Post by tmcdonald »

Thanks for sharing! Gonna lock this up since the issue has been resolved, but feel free to open another thread if you need anything else in the future.
Former Nagios employee
Locked