Page 1 of 2
Metrics Display not showing data from check_nrpe checks
Posted: Wed Nov 07, 2018 10:24 pm
by Fred Kroeger
Hi - Just run up a new XI 5.5.6 server and having problems with displaying metrics.
CPU, Disk & Memory usage work OK for checks by check_nt on Windows servers.
However when I run the equivalent check on those servers using check_nrpe, none of those checks are displayed in the Metrics screen.
What is the format of the check_nrpe commands so that they appear on the Metrics screen?
regards... Fred
Re: Metrics Display not showing data from check_nrpe checks
Posted: Thu Nov 08, 2018 1:01 pm
by ssax
It should be using the check_mem check_nrpe command, those are the only ones that will show up for the memory metrics for check_nrpe. Is that what they are using?
Re: Metrics Display not showing data from check_nrpe checks
Posted: Thu Nov 08, 2018 9:04 pm
by Fred Kroeger
Yes for the memory checks I am using check_memory.
The check_xi_service_nsclient commands are the default as per the wizard - they display OK in the Metrics page
The check_nrpe commands are what I have created and don't display in the Metrics page. I would prefer to use the check_nrpe commands as it gives me a lot more flexibility in filtering and output display.
check_nrpe
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_memory -a "warn=free < 20%" "crit=free < 10%"
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_cpu -a "warn=load > 80" "crit=load > 90"
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_drivesize -a "warn=free < 20%" "crit=free < 10%" drive=c:
check_xi_service_nsclient
$USER1$/check_nt -H $HOSTADDRESS$ -s "" -p 12489 -v MEMUSE -w 80 -c 90
$USER1$/check_nt -H $HOSTADDRESS$ -s "" -p 12489 -v CPULOAD -l 5,80,90
$USER1$/check_nt -H $HOSTADDRESS$ -s "" -p 12489 -v USEDDISKSPACE -l C -w 80 -c 95
As an example this the Service status for Memory checks (Memory Usage = check_nrpe & Memory Utilsation = check_nt)
Code: Select all
Memory Usage Ok 1d 0h 56m 44s 1/4 09/11/2018 12:23:15 Memory Usage: OK
Memory Utilisation Ok 1d 0h 25m 24s 1/5 09/11/2018 12:21:39 Memory usage: total:2569.01 MB - used: 1583.39 MB (62%) - free: 985.62 MB (38%)
I did swap around the Service names in case the Metrics Page was using the name as a filter but that made no difference.
Re: Metrics Display not showing data from check_nrpe checks
Posted: Fri Nov 09, 2018 12:49 pm
by ssax
So your check_memory command only outputs
Memory Usage: OK?
What is the full output of this command and I'll see if we can get it working for you:
- Change X.X.X.X to one of your windows servers
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 30 -c check_memory -a "warn=free < 20%" "crit=free < 10%"
Re: Metrics Display not showing data from check_nrpe checks
Posted: Sat Nov 10, 2018 5:45 am
by Fred Kroeger
Thanks command & ouput listed below
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 30 -c check_memory -a "warn=free < 20%" "crit=free < 10%"
OK: committed = 1.571GB, physical = 1.276GB|'committed'=960.42187MB;513.79765;256.89882;0;2568.98828 'committed %'=37%;20;10;0;100 'physical'=738.4375MB;409.00546;204.50273;0;2045.02734 'physical %'=36%;20;10;0;100
Snip from Service Status screen : Memory Usage is the check_nrpe service & Memory Utilisation is the check_nt service
Code: Select all
Memory Usage Ok 2d 9h 42m 26s 1/4 10/11/2018 21:08:35 OK: committed = 1.571GB, physical = 1.275GB
Memory Utilisation Ok 2d 9h 11m 36s 1/5 10/11/2018 21:08:13 Memory usage: total:2569.01 MB - used: 1608.19 MB (63%) - free: 960.82 MB (37%)
Re: Metrics Display not showing data from check_nrpe checks
Posted: Mon Nov 12, 2018 1:33 pm
by ssax
I'm labbing this up and trying to get you a solution, I'll let you know the results by the end of the day.
Re: Metrics Display not showing data from check_nrpe checks
Posted: Mon Nov 12, 2018 1:34 pm
by ssax
Please include sample outputs of the other ones as well:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_cpu -a "warn=load > 80" "crit=load > 90"
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_drivesize -a "warn=free < 20%" "crit=free < 10%" drive=c:
Re: Metrics Display not showing data from check_nrpe checks
Posted: Mon Nov 12, 2018 6:11 pm
by Fred Kroeger
NRPE commands
Code: Select all
./check_nrpe -H X.X.X.X -t 30 -c check_cpu -a "warn=load > 80" "crit=load > 90"
OK: CPU load is ok.|'total 5m'=0%;80;90 'total 1m'=0%;80;90 'total 5s'=0%;80;90
./check_nrpe -H X.X.X.X -t 30 -c check_drivesize -a "warn=free < 20%" "crit=free < 10%" drive=c:
OK All 1 drive(s) are ok|'c: free'=110.18499GB;25.28925;12.64462;0;126.44628 'c: free %'=87%;20;10;0;100
Corresponding CHECK_NT commands which do display OK in Metrics page
Code: Select all
./check_nt -H X.X.X.X -p 12489 -v CPULOAD -l 5,80,90
CPU Load 0% (5 min average) | '5 min avg Load'=0%;80;90;0;100
./check_nt -H X.X.X.X -p 12489 -v USEDDISKSPACE -l C -w 80 -c 95
C:\ - total: 126.45 Gb - used: 16.26 Gb (13%) - free 110.18 Gb (87%) | 'C:\ Used Space'=16.26Gb;101.16;120.12;0.00;126.45
Re: Metrics Display not showing data from check_nrpe checks
Posted: Tue Nov 13, 2018 4:04 pm
by ssax
Thank you for the output, I will update you later today.
Re: Metrics Display not showing data from check_nrpe checks
Posted: Thu Nov 15, 2018 5:26 pm
by ssax
Please unzip the attached file and replace this file on your XI server and see if the Memory ones for check_memory show now:
Code: Select all
/usr/local/nagiosxi/html/includes/utils-metrics.inc.php
utils-metrics.zip
Let us know the results.