# Grafana with InfluxDB 2 - Uncaught ValueError

**URL:** <https://community.icinga.com/t/grafana-with-influxdb-2-uncaught-valueerror/11539>\
**Category:** Icinga Web\
**Tags:** grafana, influxdb, icingaweb2, icinga2\
**Created:** [March 3, 2023, 1:22pm UTC](https://community.icinga.com/t/grafana-with-influxdb-2-uncaught-valueerror/11539 "2023-03-03T13:22:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkutsche](https://community.icinga.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nkutsche](https://community.icinga.com/u/nkutsche)\
**Post date:** [March 3, 2023, 1:22pm UTC](https://community.icinga.com/t/grafana-with-influxdb-2-uncaught-valueerror/11539/1 "2023-03-03T13:22:41Z")

</div>

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:

```auto
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:

 ![2023-03-03 14_15_11-Icinga2InfluxDB2 - Grafana](https://community.icinga.com/uploads/default/original/2X/4/42f4a93cc0e1dab97c6129ea85282b4211bee40e.png)

Used versions:

- Icinga Web 2 version: 2.11.3 (Git commit f917436a894c1f4148a9c3d6a27f9c20f204e44f)

- Used modules and their versions:

- 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.
