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

Class "Icinga\Module\Monitoring\Object\Host" not found caused by existance of /usr/share/icingaweb2/modules/monitoring #5322

Open
tectumopticum opened this issue Feb 6, 2025 · 3 comments

Comments

@tectumopticum
Copy link

Describe the bug

If a (empty!) directory /usr/share/icingaweb2/modules/monitoring exists on the icingaweb2-host, you get an error-message "Class "Icinga\Module\Monitoring\Object\Host" not found" if you click on a host-object in icingaweb2:

#0 /usr/share/php/Icinga/Application/ClassLoader.php(275): require()
#1 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/Detail/ObjectDetail.php(86): Icinga\Application\ClassLoader->loadClass()
#2 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/Detail/ObjectDetail.php(140): Icinga\Module\Icingadb\Widget\Detail\ObjectDetail->compatObject()
#3 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Widget/Detail/HostDetail.php(46): Icinga\Module\Icingadb\Widget\Detail\ObjectDetail->createActions()
#4 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(344): Icinga\Module\Icingadb\Widget\Detail\HostDetail->assemble()
#5 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(566): ipl\Html\HtmlDocument->ensureAssembled()
#6 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#7 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(297): ipl\Html\HtmlDocument->renderUnwrapped()
#8 /usr/share/icinga-php/ipl/vendor/ipl/html/src/BaseHtmlElement.php(365): ipl\Html\BaseHtmlElement->renderContent()
#9 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(568): ipl\Html\BaseHtmlElement->renderUnwrapped()
#10 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#11 /usr/share/icinga-php/ipl/vendor/ipl/html/src/HtmlDocument.php(568): ipl\Html\HtmlDocument->renderUnwrapped()
#12 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Compat/ViewRenderer.php(62): ipl\Html\HtmlDocument->render()
#13 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/Helper/ViewRenderer.php(970): ipl\Web\Compat\ViewRenderer->render()
#14 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#15 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Web/Controller.php(484): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#16 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Icinga\Module\Icingadb\Web\Controller->dispatch()
#17 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#18 /usr/share/php/Icinga/Application/Web.php(294): 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(String)
#21 {main}

To Reproduce

  1. mkdir /usr/share/icingaweb2/modules/monitoring
  2. check in Modules-overview that a "monitoring"-module is listed now but disabled
  3. goto Problems or Overview -> Hosts -> select an event
  4. => the error will be shown in the right frame

Expected behavior

If the module is not really existent (and disabled!) the icingaweb2-UI should not pay attention

Screenshots

Image

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About): 2.12.2
    MODULE VERSION
    businessprocess 2.5.1
    company 1.0.0
    cube 1.3.3
    director 1.11.3
    eventtracker 0.9.0
    grafana 3.0.0
    icingadb 1.1.3
    iet 0.9.0
    incubator 0.22.0
    map 2.0.0
    pdfexport 0.11.0
    reporting 1.0.2
    vspheredb 1.7.1
    x509 1.3.2
  • Web browser used: Firefox or Edge
  • Icinga 2 version used (icinga2 --version): r2.14.3-1
  • PHP version used (php --version): 8.2.26
  • Server operating system and version: SLES 15 SP6

The issue seems to effect other modules which rely on this information, e.g. eventtracker.

@carraroj
Copy link

carraroj commented Feb 6, 2025

ref/NC/839687

@nilmerg
Copy link
Member

nilmerg commented Feb 6, 2025

If you know the problem and the problem is easy to solve and has no other real consequences (i.e. removing the empty directory), should we pay attention?

Sorry, for the blunt response. But really, I think it's your responsibility to have a clean Icinga Web installation. Not ours.

@carraroj
Copy link

carraroj commented Feb 7, 2025

I think the problem is temporary solved, or @tectumopticum ?

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