Metrics - CPU & MEMORY usage not showing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
koza
Posts: 12
Joined: Wed Dec 16, 2015 7:36 am

Metrics - CPU & MEMORY usage not showing

Post by koza »

Hello, I have the exact problem that is shown here - https://support.nagios.com/forum/viewto ... 16&t=33639

CPU and Memory usage are not shown, only disk usage.
Výstřižek2.PNG
Výstřižek.PNG
I use check_nt method of monitoring but no luck with metrics.
Výstřižek4.PNG
Thanks for help,
Tomas
You do not have the required permissions to view the files attached to this post.
Last edited by dwhitfield on Tue Oct 11, 2016 11:00 am, edited 1 time in total.
Reason: marking with green check mark
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Metrics - CPU & MEMORY usage not showing

Post by lmiltchev »

What is the version of the Nagios XI and the Metrics component that you are currently using?

Admin->Manage Components

I am running Nagios XI 5.2.5 and Metrics Version: 1.2.6, and I can see both, the CPU & Memory Usage metrics in the component.
Be sure to check out our Knowledgebase for helpful articles and solutions!
koza
Posts: 12
Joined: Wed Dec 16, 2015 7:36 am

Re: Metrics - CPU & MEMORY usage not showing

Post by koza »

I've got the same configuraion.

Nagios version 5.2.5
Metrics version 1.2.6
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Metrics - CPU & MEMORY usage not showing

Post by lmiltchev »

The Metrics component works with most of the wizards that ship with XI by default. If you use some custom checks/templates, the Metrics component may not work as expected. How did you set up your CPU & Memory checks? Did you use one of our wizards (for example, Windows Server, Windows SNMP, Linux Server, NCPA Agent, etc.) ? The last screenshot that you showed us is NOT a service config but a template... How is the actual service configured?
Be sure to check out our Knowledgebase for helpful articles and solutions!
koza
Posts: 12
Joined: Wed Dec 16, 2015 7:36 am

Re: Metrics - CPU & MEMORY usage not showing

Post by koza »

Yeah it's based on that default template and we use default service config.
Výstřižek.PNG
You do not have the required permissions to view the files attached to this post.
Last edited by koza on Thu Aug 18, 2016 2:26 am, edited 2 times in total.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Metrics - CPU & MEMORY usage not showing

Post by rkennedy »

Can you show us that template? Also, do you know what type of check it's running?
Former Nagios Employee
koza
Posts: 12
Joined: Wed Dec 16, 2015 7:36 am

Re: Metrics - CPU & MEMORY usage not showing

Post by koza »

Sure, the template is in the first post, and we use check_nt_memuse. I believe the hosts were added manually, not through the wizard, could this be that issue? Is there a way to get it working without the need of reconfiguring these hosts again through wizard?

This is the check we use:
check_nt.PNG
check_nt_mem - this is for graph.

Code: Select all

<?php
#
# Copyright (c) 2006-2008 Joerg Linge (http://www.pnp4nagios.org)
# Plugin: check_nt -v MEMUSE
# $Id: check_nt_mem.php 631 2009-05-01 12:20:53Z Le_Loup $
#
#
$opt[1] = "-X0 --vertical-label \"Megabyte\" -u $MAX[1] -l 0  --title \"Windows Memory\" ";

$def[1] =  "DEF:var1=$rrdfile:$DS[1]:AVERAGE "; 
$def[1] .= "AREA:var1#00FF00:\"Memory usage\" " ; 
$def[1] .= "LINE1:var1#00000c " ; 
if ($WARN[1] != "") {  
	$def[1] .= "HRULE:$WARN[1]#FFFF00:\"Warning ($WARN[1]MB)\" " ; 
}
if ($CRIT[1] != "") {  
	$def[1] .= "HRULE:$CRIT[1]#FF0000:\"Critical ($CRIT[1]MB)\\n\" " ; 
}
$def[1] .= "GPRINT:var1:LAST:\"%6.2lf %sMB Last \" " ;
$def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf %sMB Average \" " ;
$def[1] .= "GPRINT:var1:MAX:\"%6.2lf %sMB Max \\n\" ";
?>
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Metrics - CPU & MEMORY usage not showing

Post by tgriep »

Can you login to the XI server, run the following commands and post the output? Replace xxx.xxx.xxx.xxx with the remote server's IP address.

Code: Select all

/usr/local/nagios/libexec/check_nt -H xxx.xxx.xxx.xxx -v MEMUSE -p 12489 -s klon2310
/usr/local/nagios/libexec/check_nt -H xxx.xxx.xxx.xxx -v USEDDISKSPACE -l C -p 12489 -s klon2310
/usr/local/nagios/libexec/check_nt -H xxx.xxx.xxx.xxx -v CLIENTVERSION -p 12489 -s klon2310
/usr/local/nagios/libexec/check_nt -V
Be sure to check out our Knowledgebase for helpful articles and solutions!
koza
Posts: 12
Joined: Wed Dec 16, 2015 7:36 am

Re: Metrics - CPU & MEMORY usage not showing

Post by koza »

Getting back to this problem. This is output from the server.

Code: Select all

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nt -H ebisu -v MEMUSE -p 12489 -s klon2310
Memory usage: total:6463.61 MB - used: 2232.82 MB (35%) - free: 4230.79 MB (65%) | 'Memory usage'=2232.82MB;0.00;0.00;0.00;6463.61

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nt -H ebisu -v USEDDISKSPACE -l C -p 12489 -s klon2310
C:\ - total: 39.90 Gb - used: 17.47 Gb (44%) - free 22.43 Gb (56%) | 'C:\ Used Space'=17.47Gb;0.00;0.00;0.00;39.90

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nt -H ebisu -v CLIENTVERSION -p 12489 -s klon2310
NSClient++ 0.4.4.19 2015-12-08

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nt –V
check_nt: Could not parse arguments
Usage:
check_nt -H host -v variable [-p port] [-w warning] [-c critical]
[-l params] [-d SHOWALL] [-u] [-t timeout]
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Metrics - CPU & MEMORY usage not showing

Post by tgriep »

Edit those services that the Metrics are not working correctly and set the check command back to check_xi_service_nsclient and see if that fixes the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked