Page 1 of 3

nrdp and timing out

Posted: Thu Mar 13, 2014 1:34 pm
by jssingh
Can nrdp cause service timeout errors? I'm testing out nrdp and this is the XML I'm sending:

Code: Select all

<?xml version='1.0'?> 
<checkresults>
	<checkresult type='host'>
		<hostname>alex</hostname>
		<state>0</state>
		<output>Everything looks okay!</output>
	</checkresult>
	<checkresult type='service' checktype="1">
		<hostname>alex</hostname>
		<servicename>uptime</servicename>
		<state>0</state>
		<output>okey dokey|time=4</output>
	</checkresult>
</checkresults>
and then I don't see those results show up in nagios ... so I looked in the logs and this is the what it says:
[1394735470] PASSIVE HOST CHECK: alex;0;Everything looks okay!\n
[1394735470] Warning: Check of service 'uptime' on host 'alex' timed out after 0.000s!
[1394735470] PASSIVE SERVICE CHECK: alex;uptime;3;(Service check timed out after 0.00 seconds)
[1394735470] SERVICE ALERT: alex;uptime;UNKNOWN;HARD;1;(Service check timed out after 0.00 seconds)
It seems to happen consistently. I'm guessing that there is a variable in the config that I have set incorrectly. Any ideas?

thanks!

Re: nrdp and timing out

Posted: Thu Mar 13, 2014 2:36 pm
by lmiltchev
I assume you are running Core 4... This bug has been fixed:

http://sourceforge.net/p/nagios/nagiosc ... 1f1d5fd9c/

Re: nrdp and timing out

Posted: Mon Mar 24, 2014 12:36 pm
by jssingh
Thanks ... I upgraded nagios and the timeout error stopped. But now when I try to use nrdp nothing happens. I don't see anything in the logs and there is no indication in nagios that any information was sent. I'm not sure how to even start to debug this. Any ideas?

Re: nrdp and timing out

Posted: Mon Mar 24, 2014 4:52 pm
by lmiltchev
Do you see anything in the system log?

Code: Select all

tail /var/log/messages

Re: nrdp and timing out

Posted: Mon Mar 24, 2014 5:00 pm
by jssingh
yes ... and it was not at all what I was expecting to see. =)

Code: Select all

Mar 24 14:55:14 lnxsrv78 httpd: [Mon Mar 24 14:55:14 2014] [error] [client 129.99.133.23] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 105, referer: http://lnxsrv78/nrdp/
Mar 24 14:55:14 lnxsrv78 httpd: [Mon Mar 24 14:55:14 2014] [error] [client 129.99.133.23] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php on line 105, referer: http://lnxsrv78/nrdp/
Mar 24 14:55:14 lnxsrv78 httpd: nasmac3123.ndc.nasa.gov - - [24/Mar/2014:14:55:13 -0700] "POST" "POST /nrdp/ HTTP/1.1" "" 200 170 "http://lnxsrv78/nrdp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"
I double checked the config file and didn't see anywhere to specify the timezone.

Re: nrdp and timing out

Posted: Tue Mar 25, 2014 9:23 am
by tmcdonald
That's in the PHP config file, /etc/php.ini on my system. You want to look for the date.timezone entry, and there will be a URL above it which will give you specifics on what timezones you can use. I believe you will need to restart apache after changing it.

Re: nrdp and timing out

Posted: Tue Mar 25, 2014 3:12 pm
by jssingh
Thanks ... that fixed the timezone issue. But I'm back to seeing nothing. This is the only thing I saw in /var/log/messages:

Code: Select all

Mar 25 13:08:31 lnxsrv78 httpd: nasmac3123.ndc.nasa.gov - - [25/Mar/2014:13:08:31 -0700] "POST" "POST /nrdp/ HTTP/1.1" "" 200 170 "http://lnxsrv78/nrdp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"

I don't see any reference in var/nagios.log.

Re: nrdp and timing out

Posted: Tue Mar 25, 2014 4:45 pm
by tmcdonald
Anything in the httpd logs?

tail /var/log/httpd/error_log
tail /var/log/httpd/access_log

Re: nrdp and timing out

Posted: Tue Mar 25, 2014 4:49 pm
by jssingh
nothing in error_log

just this in access_log:

Code: Select all

nasmac3123.ndc.nasa.gov - - [25/Mar/2014:14:48:44 -0700] "POST" "POST /nrdp/ HTTP/1.1" "" 200 170 "http://lnxsrv78/nrdp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"
Mar 25 14:48:44 lnxsrv78 httpd: nasmac3123.ndc.nasa.gov - - [25/Mar/2014:14:48:44 -0700] "POST" "POST /nrdp/ HTTP/1.1" "" 200 170 "http://lnxsrv78/nrdp/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"

Re: nrdp and timing out

Posted: Wed Mar 26, 2014 7:52 am
by scottwilkerson
lets take a look in /usr/local/nrdp/server/config.inc.php at the following value

Code: Select all

$cfg["check_results_dir"]
What is it set to? Are there files in the directory?

Code: Select all

ls -la /usr/local/nagios/var/spool/perfdata
does the path match the check_result_path in your nagios.cfg?