Pages

Monday, April 20, 2015

Icinga2 + Icingaweb2 beta3 on Centos 7

After customizing Cacti with some plugin, I thought it would be enough for our needs.

Actually, it turns out I have to install a Nagios (need to perform checks using customized commands) and I discovered Icinga, a fork from Nagios.

I used to work with Nagios in the past, so I decide to try Icinga (2 birds 1 stone).

So I installed Icinga2 with Icingaweb2 (which is still in beta, but most features are already working).

What I noticed during the setup :
- Icinga2 installation guide is complete.
- Icingaweb 2 installation guide still need to be completed.

For example, you need to know that icingaweb 2 need its own database for authentication (if database option is selected). Just compared the icinga2 sql schema and the icingaweb 2 sql schema (located in icingaweb2/etc/schema/), and you will see the tables are different.
And during the web setup, the user wasn't created. So I created a dedicated db for icingaweb2 and I imported the sql schema to the database (mysql -u root -p icingaweb_db < /icingaweb2/etc/schema/mysql.sql).

I installed the monitoring-plugins and set the define the path on one Icinga config file.

Finally, it works.

2 comments:

Anonymous said...

Hi, I am trying to get Icingaweb2 working on my CentOS 7 server. When I tried enabling the "Monitoring" module from web console, menu items on left panel suddenly changed into "Icinga\Exception\ConfigurationError in /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php:181 with message: No backend has been configured". However, when I tried clicking "Backends"to add one, it shows following:
#0 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(78): Icinga\Module\Monitoring\Backend\MonitoringBackend::loadConfig(NULL)
#1 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(219): Icinga\Module\Monitoring\Backend\MonitoringBackend::instance(NULL)
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Controller.php(28): Icinga\Module\Monitoring\Backend\MonitoringBackend::createBackend(NULL)
#3 /usr/share/php/Icinga/Web/Controller/ModuleActionController.php(28): Icinga\Module\Monitoring\Controller->moduleInit()
#4 /usr/share/php/Icinga/Web/Controller/ActionController.php(132): Icinga\Web\Controller\ModuleActionController->prepareInit()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(58): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array)
#6 /usr/share/php/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/Web.php(333): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/webrouter.php(109): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
#10 {main}

Can you help? Thanks.

Olivier said...

Hi Michael,

Have you check your connection to your database?

Olivier