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
Doc: Troubleshooting: Optimise apply rules and group assign conditions #9585
Conversation
doc/15-troubleshooting.md
Outdated
At least consider changing the `assign where` filter from, say | ||
`assign where my_complex_filter()`, to `assign where false && my_complex_filter()`. | ||
`&&` will evaluate `false` first and in an instant. | ||
If it's not true, `&&` will "return" `false` and skip `my_complex_filter()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you ever want to do that instead of just removing the rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For keeping it "for later". To disable it temp-ly. IDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you just comment it out? Or is it a Director thing that you can only delete but not disable?
Anyways, this section would be more useful if it covered more cases, like that host.vars.production && match(...)
is probably faster than match(...) & host.vars.production
.
doc/15-troubleshooting.md
Outdated
At least consider changing the `assign where` filter from, say | ||
`assign where my_complex_filter()`, to `assign where false && my_complex_filter()`. | ||
`&&` will evaluate `false` first and in an instant. | ||
If it's not true, `&&` will "return" `false` and skip `my_complex_filter()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then you just comment it out? Or is it a Director thing that you can only delete but not disable?
Anyways, this section would be more useful if it covered more cases, like that host.vars.production && match(...)
is probably faster than match(...) & host.vars.production
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me it @Thomas-Gelf confirms that the parts relating to Director are fine.
He already read this at the OSMC and confirmed me that it's tech-ly correct. |
Luckily not only he can Director. |
If you don't get your desired feedback once 2.14 approaches, we should just merge this. Enough (patience) is enough. |
When quoting me, please do not pick partial statements. I also told you that while this is technically correct, I consider #2661 being a bad idea, and that I find this explanation more confusing and irritating/scaring, than being helpful. It reads like an attempt to shift blame for performance issues to our users. What you can read between the lines is "do not use Apply Rules", which doesn't make you feel confident at all. While explaining internal optimizations can be helpful, there is no need to treat the documentation like a Changelog. The documentation itself is versioned. Also, the "Director Sync workaround to build materialized Apply Rules" example in this PR does only apply if columns in your Import Source carry the very same property name. |
In an ideal world, your Icinga 2 config would be evaluated in the blink of an eye. Until then, we can at least try to provide some guidance on how to get the best out of it right now. |
Just stumbled over https://docs.python.org/3.9/library/http.client.html#http.client.HTTPSConnection 😎
|
closes #9583
closes Icinga/icingaweb2-module-director#2661