Reporting Module fails to use SQL Function

trying to run a report i get the following error message… Can anybody point me to a solution ?

Blockquote

QLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION icingadb.get_sla_ok_percent does not exist (Connection.php:401)

#0 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(401): PDO->prepare() #1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(418): ipl\Sql\Connection->prepexec() #2 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/Query.php(642): ipl\Sql\Connection->select() #3 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(142): ipl\Orm\Query->yieldResults() #4 [internal function]: ipl\Orm\ResultSet->yieldTraversable() #5 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(122): Generator->valid() #6 /usr/share/icinga-php/ipl/vendor/ipl/orm/src/ResultSet.php(114): ipl\Orm\ResultSet->advance() #7 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/Reporting/SlaReport.php(114): ipl\Orm\ResultSet->rewind() #8 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/Reporting/SlaReport.php(195): Icinga\Module\Icingadb\ProvidedHook\Reporting\SlaReport->fetchReportData() #9 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/Reporting/SlaReport.php(200): Icinga\Module\Icingadb\ProvidedHook\Reporting\SlaReport->getData() #10 /usr/share/icingaweb2/modules/reporting/library/Reporting/Report.php(291): Icinga\Module\Icingadb\ProvidedHook\Reporting\SlaReport->getHtml() #11 /usr/share/icingaweb2/modules/reporting/application/controllers/ReportController.php(43): Icinga\Module\Reporting\Report->toHtml() #12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Reporting\Controllers\ReportController->indexAction() #13 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #15 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch() #16 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch() #17 /usr/share/icingaweb2/public/index.php(4): require_once(‘/usr/share/php/…’) #18 {main}

Blockquote

  • Icinga DB Web version (System - About): 1.0.1
  • Icinga Web 2 version (System - About): 2.11.1
  • Web browser: Edge
  • Icinga 2 version (icinga2 --version): r2.13.5-1
  • Icinga DB version (icingadb --version): 1.0.0.
  • PHP version used (php --version): 7.4.3
  • Server operating system and version: debian bullseye
    SQL-DB: Mysql 10.5 running with galera-4

The function get_sla_ok_percent is usually already contained in the icingadb schema. So I don’t think it’s missing. The user Icinga Web is connecting as with the database just might not have the EXECUTE permission. Try granting this.

1 Like

Thank you for the response.
The problem arose after migrating the mysql database onto a galera cluster via replication. Before that migration everything worked fine, now everyting besides the reporting module works fine.
I’ll regrant the permission again anyways.
Regards