[RESOLVED] Icinga Director not deploying settings anymore after creating a Timeperiods template named 24x7

Hello all,

I’ve got some problems using the Icinga Director unfortunately. It stopped working after creating a Icinga Director -> Notifications -> Time Periods -> Timeperiod Templates. I created a template called 24x7 and it stopped working.

I’m receiving the following error message when I try to deploy the configuration change:

"[2019-02-15 12:29:55 +0100] information/cli: Icinga application loader (version: r2.10.2-1)
[2019-02-15 12:29:55 +0100] information/cli: Loading configuration file(s).
[2019-02-15 12:29:55 +0100] critical/config: Error: Object ‘24x7’ of type ‘TimePeriod’ re-defined: in [stage]/zones.d/director-global/timeperiods.conf: 1:0-1:23; previous definition: in [stage]/zones.d/director-global/timeperiod_templates.conf: 1:0-1:25
Location: in [stage]/zones.d/director-global/timeperiods.conf: 1:0-1:23
[stage]/zones.d/director-global/timeperiods.conf(1): object TimePeriod “24x7” {
^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/timeperiods.conf(2): import “legacy-timeperiod”
[stage]/zones.d/director-global/timeperiods.conf(3): display_name = “24x7"”

Whenever I try to undo what I did and want to select the item to delete it I’m receiving the following error message:

Fatal error : Uncaught ErrorException: Uncaught ErrorException: Creating default object from empty value in /usr/share/php/Icinga/Web/Controller/ActionController.php:127 Stack trace: #0 /usr/share/php/Icinga/Web/Controller/ActionController.php(127): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(2, ‘Creating defaul…’, ‘/usr/share/php/…’, 127, Array) #1 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array) #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #3 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #4 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #5 /usr/share/icingaweb2/public/index.php(4): require_once(’/usr/share/php/…’ in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

As you can see in the following logmessage, you re-created an already existing Time period.

A timeperiod called 24x7 is part of the example configuration that’s shipped with Icinga 2. You should have a look into /etc/icinga2/conf.d copy all you need from there to another included directory and then remove the line which includes conf.d from /etc/icinga2/icinga2.conf.

1 Like

Thank you for the reply :slight_smile: That’s what I noticed, after creating the object unfortunately, but removing it wasn’t working (as I’m using a master -> Satellite -> Client connection and configure using Director) and the error was in the director directory. I’ve been able to resolve the issue, by manually deleting the entry from the MySQL database. After that everything worked fine again.