Hi,
we updated Icingaweb2 from 2.4.2 to 2.5, since then we aren't able to filter the permissions by custom variable.
We use filters like this:
[LIN]
groups = "LIN"
permissions = "application/share/navigation, module/businessprocess, module/doc, module/graphite, module/monitoring, monitoring/command/, monitoring/command/schedule-check,
monitoring/command/acknowledge-problem, monitoring/command/remove-acknowledgement, monitoring/command/comment/, monitoring/command/comment/add, monitoring/command/comment/delete, monitoring/command/downtime/,
monitoring/command/downtime/schedule, monitoring/command/downtime/delete, monitoring/command/process-check-result, monitoring/command/feature/instance, monitoring/command/feature/object/,
monitoring/command/feature/object/active-checks, monitoring/command/feature/object/passive-checks, monitoring/command/feature/object/notifications, monitoring/command/feature/object/event-handler,
monitoring/command/feature/object/flap-detection, module/pnp, module/translation"
monitoring/filter/objects = "_host_team=LINUX"
Where the groups are in LDAP and _host_team is an array in a custom variable like
vars.host_Team = [ "LINUX", "WINDOWS" ]
If I use a normal variable like host_name it works.
First we got this error, but now Icingaweb2 is just empty as if the monitoring plugin is disabled:
/var/log/messages:Dec 6 13:54:10 server1 icingaweb2[27715]: Icinga\Exception\ProgrammingError in /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php:882 with message: Cannot join "hosts", no such table found #0 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(839): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->joinVirtualTable('hosts') #1 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(963): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireVirtualTable('hosts') #2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(939): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->joinCustomvar('_host_team') #3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(802): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireCustomvar('_host_team') #4 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(504): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireColumn('_host_team') #5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(524): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireFilterColumns(Object(Icinga\Data\Filter\FilterMatch)) #6 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(524): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireFilterColumns(Object(Icinga\Data\Filter\FilterOr)) #7 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(535): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->requireFilterColumns(Object(Icinga\Data\Filter\FilterAnd)) #8 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php(493): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->addFilter(Object(Icinga\Data\Filter\FilterAnd)) #9 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php(432): Icinga\Module\Monitoring\DataView\DataView->addFilter(Object(Icinga\Data\Filter\FilterAnd)) #10 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Object/MonitoredObject.php(658): Icinga\Module\Monitoring\DataView\DataView->applyFilter(Object(Icinga\Data\Filter\FilterAnd)) #11 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Object/MonitoredObject.php(773): Icinga\Module\Monitoring\Object\MonitoredObject->fetchServicegroups() #12 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(61): Icinga\Module\Monitoring\Object\MonitoredObject->populate() #13 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(66): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction() #14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\ServiceController->showAction() #15 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('showAction') #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(407): 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('/usr/share/php/...') #20 {main}
Now we can't find some logs about this. The log level in config.ini is set to DEBUG.
icinga2 --version): icinga2 - The Icinga 2 network monitoring daemon (version: r2.8.0-1)icinga2 feature list): Disabled features: compatlog debuglog elasticsearch gelf influxdb livestatus opentsdb perfdata statusdata syslogicinga2 daemon -C):Sounds like this discussion on the forums: https://monitoring-portal.org/index.php?thread/42549-detailed-view-of-serviceproblem-cannot-join-hosts-no-such-table-found/
Thanks for your reply Michael. We just found a solution. It looks like a problem with case-sensitive. The variable was created with the Icinga Director and is called vars.Team.
In Icingaweb2 we tested _host_team AND _host_Team, both didn't work.
Now we created the variable vars.teams and _host_teams works with Icingaweb2.
We will test this behaviour with some other cases. Maybe it will also help you for the debugging.
Hi,
Thanks for the report. Any chance to test the related pull request? The case sensitivity should not be related to this issue. If you filter by host custom variables, the service groups view and service detail view should lead to the error Cannot join "hosts", no such table found.
Best regards,
Eric
@lippserd
I just tested the PR https://github.com/Icinga/icingaweb2/pull/3220/files and it works like charm. Thanks for the fast fix!
And if I could "vote", I'd vote for an immediate bugfix release.
Positive feedback for PR#3220
Fixed. Thank you.
@jschoone Wait a moment, the PR is not yet merged. Thanks for the feedback guys.
Most helpful comment
@lippserd
I just tested the PR https://github.com/Icinga/icingaweb2/pull/3220/files and it works like charm. Thanks for the fast fix!
And if I could "vote", I'd vote for an immediate bugfix release.