lmiltchev wrote:What version of the NCPA agent did you install? Run the following commands on the RHEL machine, and show the output in code wraps:
Code: Select all
ps -ef | grep ncpa
tail -100 /usr/local/ncpa/var/ncpa_listener.log
Show us one of the "failing" checks run from the command line on the Nagios XI server along with the output of it.
Example:
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H <client ip> -t 'mytoken' -P 5693 -M memory/virtual/percent -w 80 -c 90
------------------------
[lukindi@fihp-rheltst01 tmp]$ sudo ps -ef | grep ncpa
root 6906 1 0 18:36 ? 00:00:03 /usr/local/ncpa/ncpa_posix_passive --start
root 8395 1 0 18:40 ? 00:00:00 ./ncpa_posix_listener --start
lukindi 44221 65157 0 23:19 pts/0 00:00:00 grep ncpa
[lukindi@fihp-rheltst01 tmp]$ tail -100 /usr/local/ncpa/var/ncpa_listener.log
2016-04-06 18:36:25,480 6896 INFO started
2016-04-06 18:36:25,481 6896 INFO Using SSL version TLSv1
2016-04-06 18:40:44,442 6896 INFO stopped
2016-04-06 18:40:44,952 8395 INFO started
2016-04-06 18:40:44,953 8395 INFO Using SSL version TLSv1
2016-04-06 18:41:31,852 8395 INFO 10.96.30.40 - - [2016-04-06 18:41:31] "GET /testconnect?token=ncpa_test HTTP/1.0" 301 583 0.119507
2016-04-06 18:41:31,913 8395 INFO 10.96.30.40 - - [2016-04-06 18:41:31] "GET /testconnect/?token=ncpa_test HTTP/1.0" 200 152 0.000984
2016-04-06 18:41:31,978 8395 INFO 10.96.30.40 - - [2016-04-06 18:41:31] "GET /api/interface?token=ncpa_test HTTP/1.0" 200 1364 0.004404
2016-04-06 18:41:32,078 8395 INFO 10.96.30.40 - - [2016-04-06 18:41:32] "GET /api/disk?token=ncpa_test HTTP/1.0" 200 9041 0.041624
2016-04-06 18:41:33,583 8395 INFO 10.96.30.40 - - [2016-04-06 18:41:33] "GET /api/service?token=ncpa_test HTTP/1.0" 200 3907 1.445199
2016-04-06 23:15:19,625 8395 INFO 10.96.30.40 - - [2016-04-06 23:15:19] "GET /api/memory/virtual/percent/?token=ncpa_test&warning=80&critical=90&check=1 HTTP/1.0" 200 317 0.002968
[lukindi@fihp-rheltst01 tmp]$
---------------------------------
Works from XI CLI:
[root@fikc-nagxidev01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H 10.102.36.62 -t 'ncpa_test' -P 5693 -M memory/virtual/percent -w 80 -c 90
OK: percent was 35% | 'percent_0'=35%;80;90;
[root@fikc-nagxidev01 ~]#