Page 1 of 1
[Problem] Linux Machine Memory Usage.
Posted: Sun May 18, 2014 10:44 pm
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,
Re: [Problem] Linux Machine Memory Usage.
Posted: Mon May 19, 2014 9:08 am
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.
Re: [Problem] Linux Machine Memory Usage.
Posted: Mon May 19, 2014 9:12 am
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?
Re: [Problem] Linux Machine Memory Usage.
Posted: Mon May 19, 2014 11:18 am
by lmiltchev
You can try replacing the 'Memory' in the $ARG1$ field with "^Virtual memory$". Is this working better for you?
Re: [Problem] Linux Machine Memory Usage.
Posted: Mon May 19, 2014 11:23 am
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
Re: [Problem] Linux Machine Memory Usage.
Posted: Mon May 19, 2014 12:57 pm
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
Re: [Problem] Linux Machine Memory Usage.
Posted: Tue May 20, 2014 10:10 am
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.
Re: [Problem] Linux Machine Memory Usage.
Posted: Tue May 20, 2014 10:25 am
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.