Page 1 of 1

NagiosGraph Memory Usage

Posted: Mon May 15, 2017 11:26 am
by neworderfac33
Good afternoon,

I'm currently using NagiosGraph to chart memory usage - however, in one instance, it's showing the maximum usage as the full amount of RAM, both physical (4GB) and virtual (6GB).

Is there any way in which I can monitor just the use of physical memory?

Cheers

Pete

Re: NagiosGraph Memory Usage

Posted: Mon May 15, 2017 12:19 pm
by tacolover101
hi Pete, this really depends on the plugin you're using, as it simply parses the perf data returned by it. i would take a look at the plugin you're using and see if it supports physical only.

Re: NagiosGraph Memory Usage

Posted: Mon May 15, 2017 1:11 pm
by tgriep
Thanks @tacolover101 for the help. One more thing to look at is the plugin has an command line option to change the performance data output.
Some plugins have that feature.

Re: NagiosGraph Memory Usage

Posted: Tue May 16, 2017 11:03 am
by neworderfac33
At the moment, I'm using check_nt, which combines physical and virtual, so I'm going to have to change to check_nrpe to see just physical, which with 500+ (mostly WIndows) hosts will be a fairly extensive exercise...

I've managed to get my Nagios master to communicate with one remote server by changing its nsclient.ini to a check_nrpe supporting version provided by your good selves that last time I was looking at this issue:

Code: Select all

[root@MyNagiosMaster libexec]# ./check_nrpe -H mytargethost
I (0.4.3.143 2015-04-29) seem to be doing fine...
I have Googled a solution that involves me downloading an additional plugin (check_mem) at http://xmodulo.com/monitor-server-memor ... cutor.html

It's getting late in the day - would I have to install check_mem on each of my remote hosts (and indeed, is this necessarily the best way of resolving my requirement)?

Thanks in advance

Pete

Re: NagiosGraph Memory Usage

Posted: Tue May 16, 2017 12:52 pm
by tgriep
You shouldn't have to install a plugin on the Windows systems, the NSClient has a memory command in it so to check the Physocal Memory, you would run this.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c CheckMEM -a 'type=physical' MaxWarn=80% MaxCrit=90%

Re: NagiosGraph Memory Usage

Posted: Wed May 17, 2017 4:26 am
by neworderfac33
That's brilliant - thank you! :-)

Here's my final solution, if anyone's interested:

Code: Select all

define command{
command_name check_nrpe_physmem
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
}
define service{
    use                  generic-service
    host_name            MN2GAM12099U
    service_description  NRPE Physical Memory Only
    check_command        check_nrpe_physmem
    }
if you change "type=physical" to "type=page", this reflects the TOTAL, rather than the PHYSICAL memory.

The thread can now be closed, and thanks for your assistance

Pete

Re: NagiosGraph Memory Usage

Posted: Wed May 17, 2017 9:19 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!