Hello,
When trying to use the Grafana module with Icinga Web 2 we get an Uncaught ValueError instead of any visualization when looking at a host problem. In Grafana, we can see graphes but in Icinga we only get the following error message:
Uncaught ValueError: curl_setopt_array(): Argument #2 ($options) must contain only valid cURL options in /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php:220
Stack trace:
#0 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(220): curl_setopt_array()
#1 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(357): Icinga\Module\Grafana\ProvidedHook\Grapher->getMyPreviewHtml()
#2 /usr/share/icingaweb2/modules/monitoring/application/views/scripts/show/components/grapher.phtml(3): Icinga\Module\Grafana\ProvidedHook\Grapher->getPreviewHtml()
#3 /usr/share/php/Icinga/Web/View.php(235): include('...')
#4 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run()
#5 /usr/share/icingaweb2/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml(3): Zend_View_Abstract->render()
#6 /usr/share/php/Icinga/Web/View.php(235): include('...')
#7 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run()
#8 /usr/share/icingaweb2/modules/monitoring/application/views/scripts/host/show.phtml(14): Zend_View_Abstract->render()
#9 /usr/share/php/Icinga/Web/View.php(235): include('...')
#10 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run()
#11 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(904): Zend_View_Abstract->render()
#12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(925): Zend_Controller_Action_Helper_ViewRenderer->renderScript()
#13 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): Zend_Controller_Action_Helper_ViewRenderer->render()
#14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#15 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#16 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#17 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#18 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch()
#19 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#20 /usr/share/icingaweb2/public/index.php(4): require_once('...')
#21 {main}
thrown
The dashboard in Grafana:
Used versions:
-
Icinga Web 2 version: 2.11.3 (Git commit f917436a894c1f4148a9c3d6a27f9c20f204e44f)
-
Used modules and their versions:
- businessprocess - 2.4.0
- director - 1.10.2
- doc - 2.11.3
- grafana - 1.1.6
- incubator - 0.19.0
- monitoring - 2.11.3
-
Web browser used: Google Chrome (Version 110.0.5481.100 64-Bit)
-
Icinga 2 version used: r2.13.6-1
-
Grafana version: v7.5.15 (NA)
-
Grafana dashboard ID: 15361
-
InfluxDB version: v2.6.1
-
PHP version used: 8.1.13
-
Server operating system and version: Fedora Linux 36
Any help with solving this issue is appreciated.