nrdp and timing out

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

nrdp and timing out

Post 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!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: nrdp and timing out

Post by lmiltchev »

I assume you are running Core 4... This bug has been fixed:

http://sourceforge.net/p/nagios/nagiosc ... 1f1d5fd9c/
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: nrdp and timing out

Post 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?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: nrdp and timing out

Post by lmiltchev »

Do you see anything in the system log?

Code: Select all

tail /var/log/messages
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: nrdp and timing out

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrdp and timing out

Post 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.
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: nrdp and timing out

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrdp and timing out

Post by tmcdonald »

Anything in the httpd logs?

tail /var/log/httpd/error_log
tail /var/log/httpd/access_log
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: nrdp and timing out

Post 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"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nrdp and timing out

Post 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?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked