-
Notifications
You must be signed in to change notification settings - Fork 573
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
Empty result set with non-matching filters in Livestatus stats query #5626
Comments
Please fill in the issue template as proposed by GitHub next time. Reading the linked issue makes me believe that Thruk cannot handle empty result values when a filter does not match. Technically such a filter
could match or not. If it matches, the stats aggregators will calculate possible values. As seen in the other issue.
If nothing matches, there is no requirement to calculate anything. The caller must know that nothing matches and maybe re-adjust the filter.
If we would return a fake zero result set here, this would indicate that something matches, but the stats calculation actually did not. Imho the current implementation works as it should. The caller should check the returned values and decide upon them what to do. |
I think you really should talk it out between yourselves. The thruk dev has responded that this seems to indeed to be a bug. (I just hate to be the middleman here) |
I don't like ping-pong either, since every information is hidden in the linked issue, and not here. I'm open for discussions and a patch if this is indeed a bug. @gunnarbeutner 's opinion is also required on the matter :) |
Any update in this issue? Having the same problem with thruk/lmd. |
I've looked into the code to implement a simple fix. Unfortunately it is not an easy one, so this requires one to find the time to create a patch. Feel free to investigate here, the code parts are found here https://github.com/Icinga/icinga2/blob/master/lib/livestatus/livestatusquery.cpp#L514 Possible workaround - modify Thruk's code to accept empty results too, instead of accessing a key in a null object. |
I've detailed the problem in Thruk bug tracker : sni/Thruk#762
Basically, i cannot connect via livestatus from the same host, but i can from remote host.
The text was updated successfully, but these errors were encountered: