Incorrect Value for Memory Usage in Metrics

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Incorrect Value for Memory Usage in Metrics

Post 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.
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: Incorrect Value for Memory Usage in Metrics

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mejokj
Posts: 353
Joined: Mon Jul 22, 2013 10:31 pm

Re: Incorrect Value for Memory Usage in Metrics

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Incorrect Value for Memory Usage in Metrics

Post 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!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked