-
Notifications
You must be signed in to change notification settings - Fork 23
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
Filtering services not working as expected #965
Comments
Hi, seems to work fine for me without any changes:
Please verify that the hosts you get after adjusting the query, really meet the requirements. |
/ref/NC/806241 |
Sorry for spamming this issue, the findings mentioned previously in this post were just plain wrong. |
@mj84 This is an already acknowledged bug: #865 @sysadminsha After some struggling and debugging, I've reproduced it. The catch was, that I needed a host that has the custom variable you don't want (Oracle Database) but without any services attached to it. This is directly related with #974 as it's caused by the same bug. The good news is, it's easy to fix, just not easy to find 😅 |
Describe the bug
Hi
I came across this issue while filtering services by multiple conditions.
This is the query which I am using:
host.vars.application[*]~SAS*&host.vars.application[*]!=Oracle Database
While I get 60 hits for hosts, I retrieve an empty result for services using the same filter.
Now when I take the SQL queries which are generated by Icinga-DB and compare them to each other, there is a difference in the services' WHERE-clause. The service query has additional LEFT JOINs. I can finally get the correct result when I replace those with RIGHT-/INNER JOINs.
This is the simplified query which is generated by Icinga-DB:
And here the same query changed by me:
To Reproduce
Expected behavior
To see the services behind those hosts which are not filtered out.
Screenshots
See above
Your Environment
Include as many relevant details about the environment you experienced the problem in.
icinga2 --version
): r2.14.0-1icingadb --version
): v1.1.1php --version
): 7.4.33The text was updated successfully, but these errors were encountered: