Page 1 of 1

Undefined Index SERVER_PORT

Posted: Tue Mar 08, 2016 10:54 am
by pjnmorris
I'm having some issues getting a nagios fusion instance up and running to evaluate it as a possible solution for my company. I've configured our remote nagios core instances and fusion verifies the login information. However no information is pulled back. Checking the poller logs it is complaining about undefined indexes as seen below:

Code: Select all

NAGIOSCORE ALERT FETCHHemel
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
NAGIOSCORE ALERT FETCHDallas
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
NAGIOSCORE ALERT FETCHDC
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
Polling Top Alert Producers...
TRUNCATING topalertproducers table
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
2 callbacks run
....***GET DATA!***
RUNTIME: 44 INTERVAL: 44 POLL INTERVAL: 35
PHP Notice:  Undefined index: query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 80
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
PHP Notice:  Undefined variable: xml in /usr/local/nagiosfusion/html/includes/utils-tacdata.inc.php on line 459
Saving Tac Data to DB: Hemel
        SQL: INSERT INTO fusion_tac_data (server_id,server_sid,server_name,last_update_time,error,error_message)
                                                        VALUES (0,'6jchip','Hemel',1,NOW(),1,'1','<span class="tacservernotfound"><img src="http://:/nagiosfusion/images/critical_small.png"> Unable to find the required Nagios Core XML CGI.</span>') SQL Error [nagiosfusion] :</b> ERROR:  INSERT has more expressions than target columns
LINE 2:        VALUES (0,'6jchip','Hemel',1,NOW(),1,'1','<span class...
                                                    ^PHP Notice:  Undefined index: query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 80
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
PHP Notice:  Undefined variable: xml in /usr/local/nagiosfusion/html/includes/utils-tacdata.inc.php on line 459
Saving Tac Data to DB: Dallas
        SQL: INSERT INTO fusion_tac_data (server_id,server_sid,server_name,last_update_time,error,error_message)
                                                        VALUES (0,'nm4lfp','Dallas',1,NOW(),1,'1','<span class="tacservernotfound"><img src="http://:/nagiosfusion/images/critical_small.png"> Unable to find the required Nagios Core XML CGI.</span>')        SQL Error [nagiosfusion] :</b> ERROR:  INSERT has more expressions than target columns
LINE 2:        VALUES (0,'nm4lfp','Dallas',1,NOW(),1,'1','<span clas...
                                                     ^PHP Notice:  Undefined index: query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 80
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
PHP Notice:  Undefined variable: xml in /usr/local/nagiosfusion/html/includes/utils-tacdata.inc.php on line 459
Saving Tac Data to DB: DC
        SQL: INSERT INTO fusion_tac_data (server_id,server_sid,server_name,last_update_time,error,error_message)
                                                        VALUES (0,'h5dmv9','DC',1,NOW(),1,'1','<span class="tacservernotfound"><img src="http://:/nagiosfusion/images/critical_small.png"> Unable to find the required Nagios Core XML CGI.</span>')    SQL Error [nagiosfusion] :</b> ERROR:  INSERT has more expressions than target columns
LINE 2:        VALUES (0,'h5dmv9','DC',1,NOW(),1,'1','<span class="t...
                                                 ^Polling Recent Alerts...
NAGIOSCORE ALERT FETCHHemel
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
NAGIOSCORE ALERT FETCHDallas
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
NAGIOSCORE ALERT FETCHDC
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 581
PHP Notice:  Undefined index: SERVER_PORT in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 582
PHP Notice:  Undefined index: SERVER_NAME in /usr/local/nagiosfusion/html/includes/utils.inc.php on line 586
COUNT :Array
2 callbacks run
Loop time: 2 seconds
This has been built from source on a Centos 6.7 VM. Any help would be much appreciated.

Re: Undefined Index SERVER_PORT

Posted: Tue Mar 08, 2016 3:42 pm
by lmiltchev
You might need to add that host name to the /etc/hosts file on the Fusion server. It's possible that the Fusion server doesn't know how to resolve that address.

Re: Undefined Index SERVER_PORT

Posted: Wed Mar 09, 2016 9:11 am
by pjnmorris
The remote nagios hosts have been configured with IP addresses rather than hostnames so that shouldn't have an effect.

Re: Undefined Index SERVER_PORT

Posted: Wed Mar 09, 2016 4:06 pm
by lmiltchev
From the Nagios Fusion web interface, click on "Configure", and show us a screenshot of the "Manage Fused Servers" page.

Also, run the following commands on the "problem" fused servers:

Code: Select all

uname -a
cat /etc/*release
Is there anything else that we need to be aware of about the fused servers - use of SSL, proxy, custom ports, etc.?

Re: Undefined Index SERVER_PORT

Posted: Thu Mar 10, 2016 9:27 am
by pjnmorris
I've managed to resolve the issue it was to do with some rewriting rules in our apache config.

Re: Undefined Index SERVER_PORT

Posted: Thu Mar 10, 2016 11:05 am
by rkennedy
Sounds good. I'll mark this thread as resolved and close it out now.

Feel free to open a new one if you ever need assistance in the future!