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.
Incorrect Value for Memory Usage in Metrics
Incorrect Value for Memory Usage in Metrics
You do not have the required permissions to view the files attached to this post.
Re: Incorrect Value for Memory Usage in Metrics
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.
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!
Re: Incorrect Value for Memory Usage in Metrics
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.
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
Thanks for sharing the solution!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.