Undefined Index SERVER_PORT

This support forum board is for questions relating to Nagios Fusion.
Locked
pjnmorris
Posts: 3
Joined: Tue Mar 08, 2016 10:25 am

Undefined Index SERVER_PORT

Post 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.
Last edited by rkennedy on Thu Mar 10, 2016 11:05 am, edited 2 times in total.
Reason: Please use [code][/code] tags around long output
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Undefined Index SERVER_PORT

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pjnmorris
Posts: 3
Joined: Tue Mar 08, 2016 10:25 am

Re: Undefined Index SERVER_PORT

Post by pjnmorris »

The remote nagios hosts have been configured with IP addresses rather than hostnames so that shouldn't have an effect.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Undefined Index SERVER_PORT

Post 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.?
Be sure to check out our Knowledgebase for helpful articles and solutions!
pjnmorris
Posts: 3
Joined: Tue Mar 08, 2016 10:25 am

Re: Undefined Index SERVER_PORT

Post by pjnmorris »

I've managed to resolve the issue it was to do with some rewriting rules in our apache config.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Undefined Index SERVER_PORT

Post 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!
Former Nagios Employee
Locked