NagiosXI Metrics

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NagiosXI Metrics

Post by pbroste »

Hello @bramassendorp

What version of the 'check_ncpa' are you using?

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V
Meantime, I will check on the other issue that you referenced.

Thanks
Perry
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: NagiosXI Metrics

Post by bramassendorp »

pbroste wrote:Hello @bramassendorp

What version of the 'check_ncpa' are you using?

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V
Meantime, I will check on the other issue that you referenced.

Thanks
Perry
check_ncpa.py, Version 1.2.4

Should be the latest version.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NagiosXI Metrics

Post by pbroste »

Hello @bramassendorp

Thanks for following up the Nagios Plugin
For active checks current Version: 1.2.4

Thanks,
Perry
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: NagiosXI Metrics

Post by bramassendorp »

Any update on this issue?
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NagiosXI Metrics

Post by pbroste »

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:

Code: Select all

/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
Thanks,
Perry
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: NagiosXI Metrics

Post by bramassendorp »

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:

Code: Select all

/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
Thanks,
Perry
Send information via PM.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NagiosXI Metrics

Post by pbroste »

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:
[/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]
Want to have you check to see what you see logged for CPU metrics:

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
You do not have the required permissions to view the files attached to this post.
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: NagiosXI Metrics

Post by bramassendorp »

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:
[/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]
Want to have you check to see what you see logged for CPU metrics:

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:
cpu_perfdata.png
cpu_graph.png
Let us know how things look,
Perry
Here is the information:

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>
Images:
Nagios_CPU_graph.png
Nagios_CPU.png
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: NagiosXI Metrics

Post by pbroste »

Hello @bramassendorp

Thanks for following up, looks like 'get_metrics' is pulling based on the keywords:

Code: Select all

/usr/local/nagiosxi/html/includes/components/metrics/metrics.inc.php
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;
}
With that we see the following from the web console; please check this out and let us know what it looks like:
get_metric_cpu.png
Thanks,
Perry
You do not have the required permissions to view the files attached to this post.
bramassendorp
Posts: 28
Joined: Sun Jun 09, 2019 3:16 am

Re: NagiosXI Metrics

Post by bramassendorp »

Hi

Having a different browser version, so I don't know exactly what you want to see. But what I did found out, I suddenly have two hosts that suddenly do show up.

But still only two show up:
Nagios_Metrics_1.png
126 active host are in the hostgroup:
Nagios_Metrics_2.png
CPU Usage test is connected to the hostgroup:
Nagios_Metrics_3.png
Nagios_Metrics_4.png
You do not have the required permissions to view the files attached to this post.