Re: NCPA not sending passive check results to Nagios Core 4.
Posted: Mon Sep 16, 2019 2:16 pm
The commands are executed. And we are using different user called nagiosim, i have executed the chown based on this user name.
touch /usr/local/nrdp/server/debug.log
chown nagiosim:nagiosim /usr/local/nrdp/server/debug.log
I waited for few minutes and execute submit JSON check result from NRDP URL and still getting "BAD CHECK RESULTS DIR" and then the error disappeared within seconds. The debug.log is still empty.
# ls -lrt /usr/local/nrdp/server
total 20
drwxr-xr-x 4 nagiosim nagiosim 57 Aug 13 06:39 plugins
-rw-r--r-- 1 nagiosim nagiosim 12488 Aug 13 06:39 index.php
drwxr-xr-x 2 nagiosim nagiosim 135 Aug 13 06:39 includes
-rw-r--r-- 1 nagiosim nagiosim 2918 Sep 16 05:15 config.inc.php
-rwxrwxr-x 1 nagiosim nagiosim 0 Sep 16 14:26 debug.log
Here is the data logged in apache error log after the execution of chown command:
143.34.97.238 - - [16/Sep/2019:15:12:50 -0400] "POST /nrdp/ HTTP/1.1" 200 72 "http://adlg3623.na.pg.com/nrdp/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
127.0.0.1 - - [16/Sep/2019:15:13:33 -0400] "GET / HTTP/1.0" 403 3985 "-" "check_http/v2.2.1.git (nagios-plugins 2.2.1)"
Also, the user for apache is apacheim.. Please refer below outputs from Nagios server:
# grep -i nag /etc/group
nagiosim::30:nagiosim,ch1666,apacheim
Thanks,
Ram.
touch /usr/local/nrdp/server/debug.log
chown nagiosim:nagiosim /usr/local/nrdp/server/debug.log
I waited for few minutes and execute submit JSON check result from NRDP URL and still getting "BAD CHECK RESULTS DIR" and then the error disappeared within seconds. The debug.log is still empty.
# ls -lrt /usr/local/nrdp/server
total 20
drwxr-xr-x 4 nagiosim nagiosim 57 Aug 13 06:39 plugins
-rw-r--r-- 1 nagiosim nagiosim 12488 Aug 13 06:39 index.php
drwxr-xr-x 2 nagiosim nagiosim 135 Aug 13 06:39 includes
-rw-r--r-- 1 nagiosim nagiosim 2918 Sep 16 05:15 config.inc.php
-rwxrwxr-x 1 nagiosim nagiosim 0 Sep 16 14:26 debug.log
Here is the data logged in apache error log after the execution of chown command:
143.34.97.238 - - [16/Sep/2019:15:12:50 -0400] "POST /nrdp/ HTTP/1.1" 200 72 "http://adlg3623.na.pg.com/nrdp/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
127.0.0.1 - - [16/Sep/2019:15:13:33 -0400] "GET / HTTP/1.0" 403 3985 "-" "check_http/v2.2.1.git (nagios-plugins 2.2.1)"
Also, the user for apache is apacheim.. Please refer below outputs from Nagios server:
# grep -i nag /etc/group
nagiosim::30:nagiosim,ch1666,apacheim
Thanks,
Ram.