NRPE Memory Usage Metrics

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

NRPE Memory Usage Metrics

Post by gmackey »

Hello,

I just converted all my Windows memory monitors from check_nt to check_nrpe in order to get accurate checks. The checks and alerts are working perfectly but I noticed that the Memory Usage metric no longer lists any of these hosts since converting them to nrpe. Is there something I can do to make sure this data is included in the Memory Usage metric?

define service {
service_description Memory Usage
check_command check_nrpe!checkmem!-a MaxWarn=80% MaxCrit=90% ShowAll type=physical!!!!!!
}

Thanks,
Greg
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Re: NRPE Memory Usage Metrics

Post by gmackey »

I checked out the utils-metrics.inc.php file and I think I may have identified a bug. It tries to match on "check_mem" for NRPE which is incorrect (at least for NSClient++). The correct match would be "checkmem". Can someone take a look at the PHP code and see if this is a bug? I'm going to try making a quick edit, removing that underscore, to see what results.

Code: Select all

            } else if (preg_match("/check_nrpe/", $command) > 0) { //NRPE
                if (preg_match("/check_mem/", $command) > 0) {
                    return true;
                }
Update: That didn't seem to help. Still no memory usage metrics for the NRPE monitors...

Update 2: Okay, it seems the PHP code for this page hasn't been written for this type of monitor. I've forced $display to 1 and verified it is showing data now so I'm going to write the rest of the code to parse the data. I wonder what kind of NRPE command this code is trying to parse? I can't find a single example, at least for Windows, that matches up with check_mem and uses -c and -w.
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Memory Usage Metrics

Post by mcapra »

The short end of this is that the metrics component is getting a huge re-work to account for any and all performance data a bit more elegantly. Right now, it's hard-coded to target specific data sets which isn't very ideal.

I do apologize for the inconvenience. It is something the developers are aware of and are working on a solution for.
Former Nagios employee
https://www.mcapra.com/
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Re: NRPE Memory Usage Metrics

Post by gmackey »

Thank you for the response. I got the PHP code written and have good metrics for NRPE memory usage now. I'll look forward to the future update to the metrics component.

-Greg
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRPE Memory Usage Metrics

Post by cdienger »

Hi Greg,

Glad you were able to find a work around. Are we okay to lock the thread at this point?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Re: NRPE Memory Usage Metrics

Post by gmackey »

Yes, please do. Thanks.
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
Locked