Thomas-Gelf / icingaweb2-module-deployment

5 stars 5 forks source link

Downtime schedule removal #1

Open arioch opened 9 years ago

arioch commented 9 years ago

I can't seem to figure out how to have this module to remove scheduled downtime. So far I've run into this with both duration and end. Either combined or separately.

E.g.:

{
  "success": true,
  "host": "icinga",
  "downtime_comment": "duration",
  "downtime_duration": "+1min",
  "downtime_start": 1438602319,
  "downtime_end": 1438603219
}

... which results in:

deploy

Affected versions: icinga2-bin-2.3.8-1.el7.centos.x86_64 icingaweb2-2.0.0-4.rc1.el7.centos.noarch

christianVLC commented 9 years ago

I get one Error (500 Error)when I try to delete one Downtime:

Icinga\Module\Monitoring\Backend\Ido\Query\DowntimeQuery : Got invalid column: downtime_objecttype

0 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(668): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireColumn('downtime_object...')

1 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(917): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->resolveColumns(Array)

2 /usr/share/php/Icinga/Data/SimpleQuery.php(102): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->columns(Array)

3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(305): Icinga\Data\SimpleQuery->__construct(Object(Icinga\Data\Db\DbConnection), Array)

4 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php(45): Icinga\Module\Monitoring\Backend\MonitoringBackend->query('Downtime', Array)

5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(260): Icinga\Module\Monitoring\DataView\DataView->__construct(Object(Icinga\Module\Monitoring\Backend\Ido\IdoBackend), Array)

6 /usr/share/icingaweb2/modules/deployment/application/controllers/DowntimeController.php(35): Icinga\Module\Monitoring\Backend\MonitoringBackend->from('downtime', Array)

7 /usr/share/php/Zend/Controller/Action.php(516): Deployment_DowntimeController->removeAction()

8 /usr/share/php/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('removeAction')

9 /usr/share/php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))

10 /usr/share/php/Icinga/Application/Web.php(154): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))

11 /usr/share/php/Icinga/Application/webrouter.php(111): Icinga\Application\Web->dispatch()

12 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')

13 {main}

Affected versions: Icingaweb2: 2.0.0~rc1-1~debmon70+1 icinga2: 2.3.8-1~debmon70+1 Debian 7.8