Failed to load icinga_timeperiod "7"

This forum was archived to /woltlab and is now in read-only mode.
  • CentOS 6.7
    Icinga2, Icinga Web 2, Icinga Director
    MySQL


    Notifications not being sent on new hosts. Only receiving the default notifications. (Example Backup Downtime notifications)


    When trying to create a new Notification through Director, when I select the "Time period" and hit "Store" y gives the following error on screen:


    Failed to load icinga_timeperiod "7"



    #0 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php(1010): Icinga\Module\Director\Data\Db\DbObject->loadFromDb()
    #1 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(270): Icinga\Module\Director\Data\Db\DbObject::load('7', Object(Icinga\Module\Director\Db))
    #2 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(335): Icinga\Module\Director\Objects\IcingaObject->resolveUnresolvedRelatedProperty('period_id')
    #3 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php(404): Icinga\Module\Director\Objects\IcingaObject->get('period_id')
    #4 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(788): Icinga\Module\Director\Data\Db\DbObject->getProperties()
    #5 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(615): Icinga\Module\Director\Objects\IcingaObject->resolve('Properties')
    #6 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(693): Icinga\Module\Director\Objects\IcingaObject->resolveProperties()
    #7 /usr/share/icingaweb2/modules/director/library/Director/Objects/IcingaObject.php(605): Icinga\Module\Director\Objects\IcingaObject->getInherited('Properties')
    #8 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(248): Icinga\Module\Director\Objects\IcingaObject->getInheritedProperties()
    #9 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(798): Icinga\Module\Director\Web\Form\DirectorObjectForm->handleProperties(Object(Icinga\Module\Director\Objects\IcingaNotification), Array)
    #10 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(404): Icinga\Module\Director\Web\Form\DirectorObjectForm->onRequest()
    #11 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(411): Icinga\Module\Director\Web\Form\QuickForm->setRequest(Object(Icinga\Web\Request))
    #12 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(419): Icinga\Module\Director\Web\Form\QuickForm->getRequest()
    #13 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(303): Icinga\Module\Director\Web\Form\QuickForm->hasBeenSent()
    #14 /usr/share/icingaweb2/modules/director/library/Director/Web/Controller/ObjectController.php(190): Icinga\Module\Director\Web\Form\QuickForm->handleRequest()
    #15 /usr/share/php/Zend/Controller/Action.php(516): Icinga\Module\Director\Web\Controller\ObjectController->addAction()
    #16 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('addAction')
    #17 /usr/share/php/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
    #18 /usr/share/php/Icinga/Application/Web.php(384): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
    #19 /usr/share/php/Icinga/Application/webrouter.php(109): Icinga\Application\Web->dispatch()
    #20 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
    #21 {main}



    Does anyone have an idea to give me some direction here?


    Help would be highly appretiated!!!! thanks!

  • /var/log/messages errors found


    Jun 2 16:53:35 icinga icingaweb2[14737]: Icinga\Exception\NotFoundError in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:583 with message: Failed to load icinga_timeperiod "7"
    Jun 2 16:53:35 icinga icingaweb2[14737]: Stacktrace: #0 /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php(1010): Icinga\Module\Director\Data\Db\DbObject->loadFromDb() #1 /usr/s

  • Got this now:


    Storing icinga_notification[CoquiNotification] failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'apply_to' in 'field list', query was: INSERT INTO icinga_notification (object_name, object_type, disabled, apply_to, host_id, service_id, times_begin, times_end, command_id, notification_interval, period_id, zone_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) {array ( 'id' => NULL, 'object_name' => 'CoquiNotification', 'object_type' => 'template', 'disabled' => 'n', 'apply_to' => NULL, 'host_id' => NULL, 'service_id' => NULL, 'times_begin' => NULL, 'times_end' => NULL, 'command_id' => NULL, 'notification_interval' => NULL, 'period_id' => '9', 'zone_id' => NULL,)}

  • Resolved this one, it was the Schema that was not applied yet.


    Now, while creating the Notification Template. I don't have any "Notification Command" option to choose from. Where do I create this?