Page 1 of 1

Nagios Fusion installed php 5.1.6

Posted: Tue Nov 20, 2012 4:40 pm
by rsegebre
Hi,

I am currently trying to figure out why my Nagios Fusion instance is not displaying the Recent Alerts and the Top Alert Producers information for any of my Nagios Core instances. I am running Nagios Fusion on a fresh CentOS 5.5 base install. ( Please see image attached. )

After checking the /usr/local/nagiosfusion/var/poller.log and finding this message:

Code: Select all

PHP Notice:  Undefined index:  query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 77
Saving Tac Data to DB: Nagios1
PHP Notice:  Undefined index:  query in /usr/local/nagiosfusion/html/includes/utilsx.inc.php on line 77
Saving Tac Data to DB: Nagios2
Polling Recent Alerts...
NAGIOSCORE ALERT FETCHNagios1
PHP Fatal error:  Class 'DateTime' not found in /usr/local/nagiosfusion/html/includes/utils-recentalerts.inc.php on line 128
I google the last line in the log and basically found out that it is because the php version was not built with the proper flags. The nagiosfusion fullinstall script installed php 5.1.6 according to my /tmp/nagiosfusion/install.log:

Code: Select all

Dependency Installed:
  fakeroot.x86_64 0:1.12.2-21.el5.2
      .
      . 
      .
  php-devel.x86_64 0:5.1.6-39.el5_8

Updated:
  bind-utils.x86_64 30:9.3.6-20.P1.el5_8.5
      .
      .
      .
  php.x86_64 0:5.1.6-39.el5_8


My questions are:
  1. Is php 5.1.6 required for Nagios Fusion to work properly or will things start breaking if upgrade to php 5.2.x which apparently builds with the DateTime class by default which I believe will help me solve my error.
  • Is this an error other people are having?
Thank you for your time, and please let me know if you need more information.

Re: Nagios Fusion installed php 5.1.6

Posted: Wed Nov 21, 2012 11:22 am
by mguthrie
CentOS 5.5 is getting fairly dated, if it's a clean system I could consider starting with either 5.8 or 6.3. For your existing install though, if you're going to update php, I would just update to php53.

Code: Select all

yum list installed | grep php
php.i686
php-cli.i686
php-common.i686
php-gd.i686
php-mysql.i686
php-odbc.i686
php-pdo.i686
php-pear.noarch
php-pgsql.i686
php-tidy.i686
php-xml.i686

Code: Select all

yum remove -y <the list above>

Code: Select all

yum install -y <all of the packages above starting with php53->

Re: Nagios Fusion installed php 5.1.6

Posted: Wed Nov 21, 2012 1:27 pm
by rsegebre
Thanks a lot Mike! I updated php as you recommended, since I am still trying it out! If I get the full version I will probably start fresh on a clean 6.3 install. But the php upgrade got Top Alert Producers and Recent Alerts working perfectly.

Thanks again.

Re: Nagios Fusion installed php 5.1.6

Posted: Tue Nov 27, 2012 10:17 am
by mguthrie
Good deal, glad it's working for you!