/etc/php.d/50-redis.ini
redis
Registered save handlers => files user redis rediscluster
This program is free software; you can redistribute it and/or modify
So it seems to recognize it.
I’m using CentOS Linux release 7.7.1908 with PHP 5.6.40
I have the same issue…
Even tough I installed php-redis with “yum install php-pecl-redis” and restarted the php-fpm service it’s not working… I get following error message:
Uncaught Error: Class ‘Redis’ not found in /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Common/IcingaRedis.php:92
I’m using rh-php73-php-fpm… do I need to install another package?
The requirements for the icingadb should be ok.
Coincidentally, I’m having the same issue in a slightly different spot:
Uncaught Error: Class 'Redis' not found in /usr/share/icingaweb2/modules/icingadb/application/forms/RedisConfigForm.php:176
Stack trace:
#0 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Setup/RedisPage.php(56): Icinga\Module\Icingadb\Forms\RedisConfigForm::checkRedis(Object(Icinga\Module\Icingadb\Setup\RedisPage))
#1 /usr/share/php/Icinga/Web/Wizard.php(294): Icinga\Module\Icingadb\Setup\RedisPage->isValidPartial(Array)
#2 /usr/share/php/Icinga/Web/Wizard.php(264): Icinga\Web\Wizard->handleRequest(Object(Icinga\Web\Request))
#3 /usr/share/icingaweb2/modules/setup/application/controllers/IndexController.php(46): Icinga\Web\Wizard->handleRequest()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Setup\Controllers\IndexController->indexAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(O
I thought I was missing an redis module but my guesses weren’t right:
# icingacli module enable redis
ERROR: Icinga\Exception\ConfigurationError in /usr/share/php/Icinga/Application/Modules/Manager.php:248 with message: Cannot enable module "redis". Module is not installed.
The documentation, while usually very helpful in this case directs me to the web menu for redis configuration which won’t work until I have some aspect of the redis configuration working to get the web page working. I had already ran the suggested icingacli module enable icingadb. I did verify php -i | grep redis which shows:
[root@csc2cxn00003503 ~]# php -i |grep redis
/etc/php.d/redis.ini,
PHP Warning: Unknown: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
redis
Registered save handlers => files user redis rediscluster redis rediscluster
This program is free software; you can redistribute it and/or modify
UPDATE: Looks like this has something to do with the php version. I’m using php73. Tomorrow I’ll try to remove it and see if I can use 71.
The package should be called rh-php73-php-pecl-redis5 or something along the lines. You then have to restart php-fpm.
Don’t! It’s the other way round, PHP 7.1 had issues as there’s no installation candidate for the redis php extension for php-fpm. If you’re on PHP 7.3 you’re fine.
Though remember, if you’re using php-fpm for Icinga Web 2 you probably have two different php versions installed. The system’s default one and the one for php-fpm. The redis extension needs to be installed for php-fpm. Then it should work.
This means that Icinga 2’s feature for Icinga DB is not running or unable to connect to Redis. Without this, there won’t be any data Icinga DB is processing.