Page 2 of 2

Re: DB Connect Error [nagiosxi]: Database connection failed

Posted: Tue Dec 13, 2011 4:12 pm
by jladd

Code: Select all

[root@nagios libexec]# tail -f /var/log/httpd/error_log
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 107, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 108, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 109, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 110, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 115, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 116, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 117, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 118, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 119, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:10:54 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 120, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 105, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 106, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 107, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 108, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 109, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 110, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 115, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 116, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 117, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 118, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 119, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 120, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Warning:  strtotime(): 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/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Warning:  strtotime(): 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/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Warning:  strftime(): 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/New_York' for 'EST/-5.0/no DST' instead in /usr/local/nagiosxi/html/includes/utilsl.inc.php on line 372, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 105, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 106, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 107, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 108, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 109, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 110, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 115, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 116, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_latency in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 117, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: min_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 118, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 119, referer: http://192.168.101.200/nagiosxi/admin/
[Tue Dec 13 16:11:24 2011] [error] [client 192.168.101.27] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 120, referer: http://192.168.101.200/nagiosxi/admin/

Re: DB Connect Error [nagiosxi]: Database connection failed

Posted: Tue Dec 13, 2011 4:23 pm
by mguthrie
Well I'll suggest all of the possible issues and solutions that this could be:

Verify Timezone settings:

Code: Select all

yum install ntp
npdate pool.ntp.org
Then set your php timezone in /etc/php.ini
http://support.nagios.com/wiki/index.ph ... e.22_Error

Also, make sure your mysql database is in working order. Note that the host that it's attempting to connect to is "localhost" unless you've manually changed this.
http://assets.nagios.com/downloads/nagi ... tabase.pdf

Re: DB Connect Error [nagiosxi]: Database connection failed

Posted: Tue Dec 13, 2011 5:44 pm
by jladd
Tried all of that still having the same issues now. No hosts or services are showing up in nagiosxi but they are showing up in nagioscore. Even if I add something through the configuration wizards they will add fine to nagios core but not show up in nagiosxi.

Re: DB Connect Error [nagiosxi]: Database connection failed

Posted: Wed Dec 14, 2011 11:20 am
by jladd
Ok there was one other table that was not showing errors before it was the nagios_hoststatus table. Logging in today it showed the error then I ran the myisamchk -r -f nagios_hoststatus and now everything is working again. Thank you all for your support :D