What version of the 'check_ncpa' are you using?
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -V
Thanks
Perry
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -V
check_ncpa.py, Version 1.2.4pbroste wrote:Hello @bramassendorp
What version of the 'check_ncpa' are you using?
Meantime, I will check on the other issue that you referenced.Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -V
Thanks
Perry
Code: Select all
/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
Send information via PM.pbroste wrote:Hello @bramassendorp
What is the hostname of the Windows host so I can peel back the System Profile and see what is going on. Also, circling back, please send a copy of:
Thanks,Code: Select all
/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
Perry
Want to have you check to see what you see logged for CPU metrics:[/i]"GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22yourhosthere%22%2C%22service%22%3A%22Memory%20Usage%22%2C%22metric%22%3A%22memory%22%2C%22percent%22%3A%2275.80%22%2C%22current%22%3A%223.03%22%2C%22uom%22%3A%22%22%2C%22warn%22%3A%22%22%2C%22crit%22%3A%22%22%2C%22min%22%3A%22%22%2C%22max%22%3A%224%22%2C%22plugin_output%22%3A%22OK%3A%20Memory%20usage%20was%2075.90%20%25%20(Available%3A%200.96%20GiB%2C%20Total%3A%204.00%20GiB%2C%20Free%3A%200.96%20GiB%2C%20Used%3A%203.03%20GiB)%22%2C%22command%22%3A%22check_xi_ncpa%22%2C%22mode%22%3A%22outboard%22%7D%7D&nsp=0da715d99aabb0eaf1f4f2d26cc724f72bf58e5116f9d9d765c77275ef329403 HTTP/1.1" 463[/i]
Code: Select all
grep -Ei 'metrics' /var/log/httpd/* | grep -Ei 'CPU|memory' | grep -Ei 'yourhostnamehere' | less -SR
The ncpa CPU data directly from the service check look correct from your Windows devices:
[attachment=1]cpu_perfdata.png[/attachment]
[attachment=0]cpu_graph.png[/attachment]
Let us know how things look,
Perry
Here is the information:pbroste wrote:cpu_perfdata.png[/attachment]Hello @bramassendorp
Thanks for following up with the info, appears that the utils-metrics.inc.php matches. Looking over the PHP activity we see 'memory' stats sent over from the two Windows example hosts that you provided, but we don't see anything CPU-related going over. Example:
Want to have you check to see what you see logged for CPU metrics:[/i]"GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22yourhosthere%22%2C%22service%22%3A%22Memory%20Usage%22%2C%22metric%22%3A%22memory%22%2C%22percent%22%3A%2275.80%22%2C%22current%22%3A%223.03%22%2C%22uom%22%3A%22%22%2C%22warn%22%3A%22%22%2C%22crit%22%3A%22%22%2C%22min%22%3A%22%22%2C%22max%22%3A%224%22%2C%22plugin_output%22%3A%22OK%3A%20Memory%20usage%20was%2075.90%20%25%20(Available%3A%200.96%20GiB%2C%20Total%3A%204.00%20GiB%2C%20Free%3A%200.96%20GiB%2C%20Used%3A%203.03%20GiB)%22%2C%22command%22%3A%22check_xi_ncpa%22%2C%22mode%22%3A%22outboard%22%7D%7D&nsp=0da715d99aabb0eaf1f4f2d26cc724f72bf58e5116f9d9d765c77275ef329403 HTTP/1.1" 463[/i]
The ncpa CPU data directly from the service check look correct from your Windows devices: Let us know how things look,Code: Select all
grep -Ei 'metrics' /var/log/httpd/* | grep -Ei 'CPU|memory' | grep -Ei 'yourhostnamehere' | less -SR
Perry
Code: Select all
/var/log/httpd/ssl_access_log-20220213:10.31.3.75 - - [10/Feb/2022:16:58:46 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usage%>
/var/log/httpd/ssl_access_log-20220220:10.31.3.75 - - [14/Feb/2022:15:09:24 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usage%>
/var/log/httpd/ssl_access_log-20220220:10.31.3.75 - - [14/Feb/2022:15:09:34 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usage%>
/var/log/httpd/ssl_access_log-20220220:10.31.220.10 - - [17/Feb/2022:10:54:55 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_access_log-20220227:10.31.220.14 - - [21/Feb/2022:12:06:25 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_access_log-20220227:10.31.220.14 - - [21/Feb/2022:14:04:16 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_access_log-20220306:10.31.220.13 - - [01/Mar/2022:13:38:04 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_access_log-20220306:10.31.220.10 - - [03/Mar/2022:14:56:17 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_access_log-20220306:10.31.220.10 - - [03/Mar/2022:14:56:22 +0100] "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22service%22%3A%22Memory%20Usag>
/var/log/httpd/ssl_request_log-20220213:[10/Feb/2022:16:58:46 +0100] 10.31.3.75 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22ser>
/var/log/httpd/ssl_request_log-20220220:[14/Feb/2022:15:09:24 +0100] 10.31.3.75 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22ser>
/var/log/httpd/ssl_request_log-20220220:[14/Feb/2022:15:09:34 +0100] 10.31.3.75 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22ser>
/var/log/httpd/ssl_request_log-20220220:[17/Feb/2022:10:54:55 +0100] 10.31.220.10 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
/var/log/httpd/ssl_request_log-20220227:[21/Feb/2022:12:06:25 +0100] 10.31.220.14 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
/var/log/httpd/ssl_request_log-20220227:[21/Feb/2022:14:04:16 +0100] 10.31.220.14 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
/var/log/httpd/ssl_request_log-20220306:[01/Mar/2022:13:38:04 +0100] 10.31.220.13 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
/var/log/httpd/ssl_request_log-20220306:[03/Mar/2022:14:56:17 +0100] 10.31.220.10 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
/var/log/httpd/ssl_request_log-20220306:[03/Mar/2022:14:56:22 +0100] 10.31.220.10 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_metricsguage_dashlet_html%22%2C%22args%22%3A%7B%22host%22%3A%22eu1bak01%22%2C%22s>
Code: Select all
/usr/local/nagiosxi/html/includes/components/metrics/metrics.inc.php
With that we see the following from the web console; please check this out and let us know what it looks like:function metrics_component_get_display_params($metric, $sortval, $current, $warn, $crit, &$width, &$color, $command=null, $max=100, $plugin_output)
{
$width = $sortval;
$color = "green";
$use_global_thresholds = false;
if ($use_global_thresholds == true) {
switch ($metric) {
case "disk":
// some defaults (should be configurable later)
if ($sortval > 90)
$color = "red";
else if ($sortval > 75)
$color = "orange";
else if ($sortval > 60)
$color = "yellow";
break;
case "cpu":
// some defaults (should be configurable later)
if ($sortval > 95)
$color = "red";
else if ($sortval > 85)
$color = "orange";
else if ($sortval > 70)
$color = "yellow";
break;
case "memory":
// some defaults (should be configurable later)
if ($sortval > 95)
$color = "red";
else if ($sortval > 90)
$color = "orange";
else if ($sortval > 85)
$color = "yellow";
break;
// special case for load
case "load":
if ($width > 100)
$width = 100;
break;
case "swap":
// some defaults (should be configurable later)
if ($sortval > 95)
$color = "red";
else if ($sortval > 85)
$color = "orange";
else if ($sortval > 70)
$color = "yellow";
break;
default:
break;
}