Page 1 of 1

Incorrect Value for Memory Usage in Metrics

Posted: Sun Sep 29, 2019 6:06 am
by mejokj
Hello,

I am getting incorrect values for linux hosts in Nagios XI, Metrics --> Memory USage--> Linux Hosts--> %Utilization.

Below is my free -m output of the server.

++++++++++++++++++++
root@localhost:~# free -m
total used free shared buff/cache available
Mem: 7849 2243 238 17 5366 5285
Swap: 975 0 975

++++++++++++++++++++

Also, I have attached the metrics status and memory service status.

Re: Incorrect Value for Memory Usage in Metrics

Posted: Mon Sep 30, 2019 10:07 am
by lmiltchev
What is the version of Nagios XI and the version of the Metrics component that you are currently using? Have you modified the "vanilla" Metrics component in any way?

Show us the actual check run from the command line along with the output of it.

Note: You can view the actual command by going to Configure > Core Config Manager > Services > <your service> > Run Check Command.

Re: Incorrect Value for Memory Usage in Metrics

Posted: Wed Oct 02, 2019 3:47 am
by mejokj
We did some internal testing and figured out this is an issue only on Suse servers because the output of free -m is different.

Here's the fix:

In the file /usr/local/nagios/etc/nrpe/common.cfg

Remove the '-n' from this line:
command[check_mem]=/usr/local/nagios/libexec/custom_check_mem -n $ARG1$

command[check_mem]=/usr/local/nagios/libexec/custom_check_mem $ARG1$

Then: systemctl restart xinetd

The metrics are showing up properly after this change.

Re: Incorrect Value for Memory Usage in Metrics

Posted: Wed Oct 02, 2019 6:42 am
by scottwilkerson
mejokj wrote:We did some internal testing and figured out this is an issue only on Suse servers because the output of free -m is different.

Here's the fix:

In the file /usr/local/nagios/etc/nrpe/common.cfg

Remove the '-n' from this line:
command[check_mem]=/usr/local/nagios/libexec/custom_check_mem -n $ARG1$

command[check_mem]=/usr/local/nagios/libexec/custom_check_mem $ARG1$

Then: systemctl restart xinetd

The metrics are showing up properly after this change.
Thanks for sharing the solution!