Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for service-name with special characters #212

Closed
basg opened this issue Jun 25, 2019 · 3 comments
Closed

Error for service-name with special characters #212

basg opened this issue Jun 25, 2019 · 3 comments

Comments

@basg
Copy link

basg commented Jun 25, 2019

Traceback from icingaweb2:

#0 /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Grapher.php(538): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(Integer, String, String, Integer, Array)
#1 zend.view:///usr/share/icingaweb2/modules/monitoring/application/views/scripts/show/components/grapher.phtml(3): Icinga\Module\Grafana\ProvidedHook\Grapher->getPreviewHtml(Object(Icinga\Module\Monitoring\Object\Service))
#2 /usr/share/php/Icinga/Web/View.php(259): include(String)
#3 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run(String)
#4 zend.view:///usr/share/icingaweb2/modules/monitoring/application/views/scripts/partials/object/detail-content.phtml(3): Zend_View_Abstract->render(NULL)
#5 /usr/share/php/Icinga/Web/View.php(259): include(String)
#6 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run(String)
#7 zend.view:///usr/share/icingaweb2/modules/monitoring/application/views/scripts/service/show.phtml(8): Zend_View_Abstract->render(NULL)
#8 /usr/share/php/Icinga/Web/View.php(259): include(String)
#9 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run(String)
#10 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(904): Zend_View_Abstract->render(NULL)
#11 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(925): Zend_Controller_Action_Helper_ViewRenderer->renderScript(String, NULL)
#12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): Zend_Controller_Action_Helper_ViewRenderer->render()
#13 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#15 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#16 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#17 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#18 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#19 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#20 {main}

Expected Behavior

For all services, regardless of any special characters in their names, Icingaweb2 shows the service detail page, including graphs from Grafana.

Current Behavior

When a service name includes the | (pipe) character, Icingaweb2 is not able to show the service detail page and displays a traceback and error message. Perhaps this also happens when servicenames include other special characters that we are not yet aware of.

Possible Solution

Fix a bug that arose in version 1.3.5.
Stack trace points to a problem in this file: https://github.com/Mikesch-mp/icingaweb2-module-grafana/blob/master/library/Grafana/ProvidedHook/Grapher.php

Steps to Reproduce

  1. Upgrade icingaweb2-module-grafana to v1.3.5
  2. Ensure that a service is present that has a | character in it's name (i.e. apache|example.com)
  3. Open Icingaweb2 and navigate to the service detail page
  4. Observe the error in your browser

Context

After upgrading to version 1.3.5, we are unable to browse Icinga service detail pages for services that have a | character in their names. After downgrading to 1.3.4 the problem disappears again.
Seeing the traceback in Icingaweb and the changelog the bug could be in this file: https://github.com/Mikesch-mp/icingaweb2-module-grafana/blob/master/library/Grafana/ProvidedHook/Grapher.php

Environment

  • Icinga Web 2 Grafana version (System - About): 1.3.5
  • Icinga Web 2 version and modules (System - About): 2.6.3
  • Version used (icinga2 --version): 2.10.5-1
  • Operating System and version: CentOS 7 / 3.10.0-957.12.2.el7.x86_64
@wimaerts
Copy link

wimaerts commented Aug 5, 2019

i might have a similar problem:

&var-disk=/boot as custom variable doesnt work in 1.3.5, it does work in 1.3.4

@Mikesch-mp
Copy link
Owner

@basg should be working with new version of module (will be released later)
image

@wimaerts this is another problem, looking into it

@Mikesch-mp
Copy link
Owner

@wimaerts works in 1.3.6 now too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants