NCPA - Run Check Command fails in GUI
Posted: Thu Jul 30, 2020 2:20 pm
When defining new Service Templates in the GUI, the option to "run check command" button is clicked and the check command fails with the following error. However, when pasting the EXACT same command line into the OS bash shell cmd-line, it works flawless and is successful. What is happening and Why? I've even tried to escape certain special chars but to no avail. See details below.
GUI Executed:
Check command: "check_xi_ncpa"
$USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
$ARGS1$ = -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
GUI-Run Check Command button executed:
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H ch-nagios-p02 -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
UNKNOWN: The node (\/var) requested does not exist. You may be trying to access the '/' node.
Same above command executed in OS BASH Shell:
Cmd-line: (Same host):
[root@li-nagios-p01 etc]# /usr/local/nagios/libexec/check_ncpa.py -H ch-nagios-p02 -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
OK: Used disk space was 8.40 % (Used: 1.34 GB, Free: 14.56 GB, Total: 16.78 GB) | 'used'=1.34GB;15;16; 'free'=14.56GB;15;16; 'total'=16.78GB;15;16;
SYSTEM DETAILS:
Host where command is being defined and executed: RHEL 7.8
# rpm -qa ncpa
ncpa-2.2.2-1.el7.x86_64
# rpm -qa nagiosxi
nagiosxi-5.7.2-2.el7.x86_64
Destination Nagios XI: RHEL 7.8
# rpm -qa ncpa
ncpa-2.2.2-1.el7.x86_64
# rpm -qa nagiosxi
nagiosxi-5.7.2-2.el7.x86_64
# rpm -qi nagiosxi-nagiosplugins-5.7.2-2.el7.x86_64
Name : nagiosxi-nagiosplugins
Version : 5.7.2
Release : 2.el7
Architecture: x86_64
Install Date: Tue 28 Jul 2020 02:22:16 PM CDT
Group : Applications/System
Size : 10342254
License : Nagios Software License
Signature : RSA/SHA1, Thu 16 Jul 2020 04:58:32 PM CDT, Key ID 67a75c9bc62934a0
Source RPM : nagiosxi-5.7.2-2.el7.src.rpm
Build Date : Thu 16 Jul 2020 04:57:11 PM CDT
Build Host : localhost
Relocations : (not relocatable)
Vendor : Nagios Enterprises (http://www.nagios.com)
URL : http://www.nagios.com/
Summary : Base Nagios Plugins Package
Description :
Nagios XI specific Nagios Plugins Package
# ls -ltr /usr/local/nagios/libexec/check_ncpa.py
-rwxrwxr-x. 1 apache nagios 11845 Jul 28 14:24 /usr/local/nagios/libexec/check_ncpa.py
GUI Executed:
Check command: "check_xi_ncpa"
$USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
$ARGS1$ = -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
GUI-Run Check Command button executed:
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H ch-nagios-p02 -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
UNKNOWN: The node (\/var) requested does not exist. You may be trying to access the '/' node.
Same above command executed in OS BASH Shell:
Cmd-line: (Same host):
[root@li-nagios-p01 etc]# /usr/local/nagios/libexec/check_ncpa.py -H ch-nagios-p02 -t pass -P 5666 -M 'disk/logical/|var' --units G -w 90 -c 95
OK: Used disk space was 8.40 % (Used: 1.34 GB, Free: 14.56 GB, Total: 16.78 GB) | 'used'=1.34GB;15;16; 'free'=14.56GB;15;16; 'total'=16.78GB;15;16;
SYSTEM DETAILS:
Host where command is being defined and executed: RHEL 7.8
# rpm -qa ncpa
ncpa-2.2.2-1.el7.x86_64
# rpm -qa nagiosxi
nagiosxi-5.7.2-2.el7.x86_64
Destination Nagios XI: RHEL 7.8
# rpm -qa ncpa
ncpa-2.2.2-1.el7.x86_64
# rpm -qa nagiosxi
nagiosxi-5.7.2-2.el7.x86_64
# rpm -qi nagiosxi-nagiosplugins-5.7.2-2.el7.x86_64
Name : nagiosxi-nagiosplugins
Version : 5.7.2
Release : 2.el7
Architecture: x86_64
Install Date: Tue 28 Jul 2020 02:22:16 PM CDT
Group : Applications/System
Size : 10342254
License : Nagios Software License
Signature : RSA/SHA1, Thu 16 Jul 2020 04:58:32 PM CDT, Key ID 67a75c9bc62934a0
Source RPM : nagiosxi-5.7.2-2.el7.src.rpm
Build Date : Thu 16 Jul 2020 04:57:11 PM CDT
Build Host : localhost
Relocations : (not relocatable)
Vendor : Nagios Enterprises (http://www.nagios.com)
URL : http://www.nagios.com/
Summary : Base Nagios Plugins Package
Description :
Nagios XI specific Nagios Plugins Package
# ls -ltr /usr/local/nagios/libexec/check_ncpa.py
-rwxrwxr-x. 1 apache nagios 11845 Jul 28 14:24 /usr/local/nagios/libexec/check_ncpa.py