Page 1 of 2
Metrics - CPU & MEMORY usage not showing
Posted: Thu Mar 17, 2016 3:20 am
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
Re: Metrics - CPU & MEMORY usage not showing
Posted: Thu Mar 17, 2016 9:28 am
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.
Re: Metrics - CPU & MEMORY usage not showing
Posted: Thu Mar 17, 2016 9:43 am
by koza
I've got the same configuraion.
Nagios version 5.2.5
Metrics version 1.2.6
Re: Metrics - CPU & MEMORY usage not showing
Posted: Thu Mar 17, 2016 2:51 pm
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?
Re: Metrics - CPU & MEMORY usage not showing
Posted: Fri Mar 18, 2016 1:51 am
by koza
Yeah it's based on that default template and we use default service config.
Výstřižek.PNG
Re: Metrics - CPU & MEMORY usage not showing
Posted: Fri Mar 18, 2016 1:54 pm
by rkennedy
Can you show us that template? Also, do you know what type of check it's running?
Re: Metrics - CPU & MEMORY usage not showing
Posted: Mon Mar 21, 2016 8:49 am
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\" ";
?>
Re: Metrics - CPU & MEMORY usage not showing
Posted: Mon Mar 21, 2016 3:34 pm
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
Re: Metrics - CPU & MEMORY usage not showing
Posted: Thu Aug 18, 2016 2:27 am
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]
Re: Metrics - CPU & MEMORY usage not showing
Posted: Thu Aug 18, 2016 9:47 am
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.