-
Notifications
You must be signed in to change notification settings - Fork 582
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
[dev.icinga.com #10561] "remove-comment" action does not support filters #3620
Comments
Updated by gbeutner on 2015-11-07 11:25:44 +00:00 In fact, why is there a "remove-all-comments" action? (Same problem for downtimes.) |
Updated by mfriedrich on 2015-11-07 15:09:49 +00:00
That"s true, I thought about the same thing yesterday night. I"ll look into that on the weekend :) |
Updated by mfriedrich on 2015-11-08 11:58:46 +00:00 The problem is primarily that the comment/downtime actions take place on a Checkable object where we do not know about the downtime name being removed (no filter would then mean remove all downtimes for the matched checkable object). That change is rather trivial. Changing the registered filter types unveils a different problem - GetFilterTargets does properly filter for "downtime.name" which yields to an empty result set.
https://localhost:5665/v1/objects/downtimes?filter=match("i-\*", downtime.name) returns an empty result while having the downtime with the following attributes:
I could think of a problem passing the ! inside the matching string to the filter which results in a parsing error, or something like that. I"ve pushed my changes to a feature branch for now. |
Updated by mfriedrich on 2015-11-08 13:21:54 +00:00 Use simple filters for removing a single downtime or comment: ?downtime=... Using advanced filters requires a type, being Host, Service and Downtime/Comment. That way you can
|
Updated by mfriedrich on 2015-11-08 13:24:06 +00:00
Applied in changeset 1d2606c. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/10561
Created by gbeutner on 2015-11-07 11:24:29 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2015-11-08 13:24:06 +00:00)
Target Version: 2.4.0
Last Update: 2015-11-08 13:24:06 +00:00 (in Redmine)
Why is there a separate "name" attribute instead of just using the filter mechanism we"re using for virtually all other actions?
Changesets
2015-11-08 13:22:10 +00:00 by mfriedrich 1d2606c
2015-11-10 15:13:14 +00:00 by mfriedrich f5da37b
The text was updated successfully, but these errors were encountered: