Asking for a "one week" host SLA report produces the following stack trace:
SQLSTATE[22000]: Data exception: 7 ERROR: result of range difference would not be contiguous
CONTEXT: SQL function "idoreports_get_sla_ok_percent" statement 1, query was: SELECT h.display_name AS host_display_name, h.display_name AS host_display_name, idoreports_get_sla_ok_percent(ho.object_id, '2021-06-26 13:15:38', '2021-07-03 13:15:38', NULL) AS sla FROM icinga_objects AS ho
INNER JOIN icinga_hosts AS h ON h.host_object_id = ho.object_id AND ho.is_active = 1 AND ho.objecttype_id = 1 ORDER BY LOWER(h.display_name) ASC (Pdo.php:225)
#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT h.displa...', Array)
#3 /usr/local/share/icingaweb2/modules/idoreports/library/Idoreports/IdoReport.php(191): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select))
#4 /usr/local/share/icingaweb2/modules/idoreports/library/Idoreports/HostSlaReport.php(86): Icinga\Module\Idoreports\IdoReport->fetchHostSla(Object(Icinga\Module\Reporting\Timerange), Array)
#5 /usr/local/share/icingaweb2/modules/idoreports/library/Idoreports/IdoReport.php(30): Icinga\Module\Idoreports\HostSlaReport->fetchSla(Object(Icinga\Module\Reporting\Timerange), Array)
#6 /usr/local/share/icingaweb2/modules/reporting/library/Reporting/Report.php(293): Icinga\Module\Idoreports\IdoReport->getHtml(Object(Icinga\Module\Reporting\Timerange), Array)
#7 /usr/local/share/icingaweb2/modules/reporting/application/controllers/ReportController.php(42): Icinga\Module\Reporting\Report->toHtml()
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Reporting\Controllers\ReportController->indexAction()
#9 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#10 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#11 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#12 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#13 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')
#14 {main}
To Reproduce
Steps to reproduce the behavior:
Create the most basic Host SLA report: One Week (or One Month, One Year, Last Day, Last Month, Current Year, Last Year), no template, no filter, no breakdown, no threshold.
Click on it and behold the above "Data exception".
Change the Timeperiod to 4 Hours, 25 Hours, Current Day, Last Day, Current Week, Current Month.
A report now works.
Expected behavior
The report should work with any Timeframe.
Your Environment
Module version: 0.9.1
Dependent
module
version
ipl
v0.5.0
monitoring
2.6.2
reactbundle
0.9.0
reporting
0.10.0
Icinga Web 2 version and modules (System - About): 2.6.2
Web browser and version: Firefox 78.11.0esr
Icinga 2 version used (icinga2 --version): r2.10.3-1
PostgreSQL version (psql --version): psql (PostgreSQL) 11.12 (Debian 11.12-0+deb10u1)
PHP version used (php --version): 7.3.27-1~deb10u1
Server operating system and version: Debian buster 10.10
Describe the bug
Asking for a "one week" host SLA report produces the following stack trace:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The report should work with any Timeframe.
Your Environment
icinga2 --version
): r2.10.3-1psql --version
): psql (PostgreSQL) 11.12 (Debian 11.12-0+deb10u1)php --version
): 7.3.27-1~deb10u1