tailing the apache ssl_error_log in Nagios XI 2014R1.5 I found the following two PHP errors showing up.
PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://hammerhead.uchospitals.edu/nagi ... -index.php
and
PHP Notice: Undefined variable: sync_table_status in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 195, referer: https://hammerhead.uchospitals.edu/nagi ... -index.php
Both of which I found being discussed in this post:
http://support.nagios.com/forum/viewtop ... 8&p=108642
So I ran the commands listed here to see what the status of the display errors were but noticed that in my case they were already Off.
cat /etc/php.ini | grep 'error_reporting = '
error_reporting = E_ALL & ~E_DEPRECATED
cat /etc/php.ini | grep 'display_errors'
; display_errors
display_errors = Off
They show up often whenever I click on links CCM (hosts, serices, host groups, serivce groups, contacts... etc). Is there another location where these should be suppressed? Are these errors something to worry about?
ssl_error_log in Nagios XI 2014R1.5
Re: ssl_error_log in Nagios XI 2014R1.5
So two things to clear up regarding PHP:
1.) Displaying errors and logging them are two different things. Displaying means to print the error to the screen, and logging means to save the error in the /var/log/ directory (or wherever you have it set to log). You do have it set to not display, but it will still log.
2.) Errors and Notices in PHP are also very different. Errors prevent the script from finishing, while Notices are there for informational purposes and can be safely ignored.
I believe that specific message was dealt with in a somewhat recent XI release.
1.) Displaying errors and logging them are two different things. Displaying means to print the error to the screen, and logging means to save the error in the /var/log/ directory (or wherever you have it set to log). You do have it set to not display, but it will still log.
2.) Errors and Notices in PHP are also very different. Errors prevent the script from finishing, while Notices are there for informational purposes and can be safely ignored.
I believe that specific message was dealt with in a somewhat recent XI release.
Former Nagios employee
Re: ssl_error_log in Nagios XI 2014R1.5
Excellent. Thanks for the clarity on display vs logging.
So they show up like this below... stating error in an error log with a PHP Notice
So I should ignore them?
[Mon Dec 15 09:52:49 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=hosttemplate
[Mon Dec 15 11:02:14 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/xi-index.php
[Mon Dec 15 11:09:10 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=servicetemplate
[Mon Dec 15 11:11:09 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/xi-index.php
[Mon Dec 15 11:11:13 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=servicetemplate
[Mon Dec 15 11:21:26 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=modify&type=servicetemplate&id=83&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
[Mon Dec 15 11:21:29 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=view&type=servicetemplate
[Mon Dec 15 11:55:03 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/data_class.php on line 1558, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=modify&type=servicetemplate&id=78&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
[Mon Dec 15 11:55:03 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: service_description in /usr/local/nagiosxi/html/includes/components/ccm/classes/data_class.php on line 1558, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=modify&type=servicetemplate&id=78&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
As annoying as it sounds it is best to ask twice than to curse stuff out for not knowing better later.
So they show up like this below... stating error in an error log with a PHP Notice
So I should ignore them?
[Mon Dec 15 09:52:49 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=hosttemplate
[Mon Dec 15 11:02:14 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/xi-index.php
[Mon Dec 15 11:09:10 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=servicetemplate
[Mon Dec 15 11:11:09 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/xi-index.php
[Mon Dec 15 11:11:13 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=view&type=servicetemplate
[Mon Dec 15 11:21:26 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 175, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/?cmd=modify&type=servicetemplate&id=83&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
[Mon Dec 15 11:21:29 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 53, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=view&type=servicetemplate
[Mon Dec 15 11:55:03 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: config_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/data_class.php on line 1558, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=modify&type=servicetemplate&id=78&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
[Mon Dec 15 11:55:03 2014] [error] [client <myworkstationIP>] PHP Notice: Undefined index: service_description in /usr/local/nagiosxi/html/includes/components/ccm/classes/data_class.php on line 1558, referer: https://<myNagiosServerName>/nagiosxi/includes/components/ccm/index.php?cmd=modify&type=servicetemplate&id=78&returnUrl=index.php%3Fcmd%3Dview%26type%3Dservicetemplate
As annoying as it sounds it is best to ask twice than to curse stuff out for not knowing better later.
Re: ssl_error_log in Nagios XI 2014R1.5
The "error" type conflicting with the "Notice" is confusing, I agree. Basically the "error" is the message type according to the logging daemon, and the "Notice" is the message severity according to PHP. PHP knows it isn't a major issue, but the logging process categorized it as "error" which means a different thing outside of the context of PHP.
The worst thing that will happen here is the logs will fill up a bit more. I believe this issue was addressed in recent releases of XI.
The worst thing that will happen here is the logs will fill up a bit more. I believe this issue was addressed in recent releases of XI.
Former Nagios employee