notifications: Attribute Negotiation#1120
Conversation
de14b08 to
3f347ee
Compare
|
Updated the PR after talking about it with @yhabteab offline. Next to some smaller bugfixes and changes, the following more prominent changes were made:
|
3f347ee to
208bf74
Compare
|
Sorry, pushed a small change to ensure that the complete relations are always populated and remove duplicate code. |
yhabteab
left a comment
There was a problem hiding this comment.
Quote from #1098:
If Icinga DB is configured to always include particular relations, it can signal Icinga Notifications that these are complete and cannot be updated by using a request header:
X-Icinga-Complete-Relations: host.vars, services[*].vars
This is still missing!
208bf74 to
d97709c
Compare
|
Updated the PR and tried to address all of @yhabteab's review comments. Most prominent, the following changes were made:
However, I still have to address the main review comment, which I am going to do tomorrow. Afterwards, maybe a bit of refactoring would be pleasant for the reviewer's eyes. |
d97709c to
2e2c03d
Compare
|
After a bit of internal refactoring and adding configuration options, I would kindly ask you to take another look, @yhabteab. All prior comments should have been addressed in the diff. |
yhabteab
left a comment
There was a problem hiding this comment.
I've left few comments from briefly looking at the code. But, I can tell you that it looks way better than the previous version. I need to spend some more time to understand the relationsProvider implementation though, since it seems to be doing a lot of things. I'll continue to review the code tomorrow!
2e2c03d to
2493aff
Compare
|
Tried to address all comments next to some changes, such as a combined SQL query to fetch host and service groups instead of an SQL query for IDs and a Redis query afterwards. |
e4c907a to
8caa1e1
Compare
Initial support for attribute negotiation, the big change with Icinga Notifications v1.0. Now, the notifications.Client does not evaluate the rules by itself anymore, but passes a subset of available information to Icinga Notifications. From there on, Icinga Notifications might return multiple JSONPath objects, which are being used to enrich the submitted event. This change required an adjustment to the icinga-go-library, which was bumped here to its PR branch.
8caa1e1 to
26569ce
Compare
Initial support for attribute negotiation, the big change with Icinga Notifications v1.0.
Now, the notifications.Client does not evaluate the rules by itself anymore, but passes a subset of available information to Icinga Notifications. From there on, Icinga Notifications might return multiple JSONPath objects, which are being used to enrich the submitted event.
This change required an adjustment to the icinga-go-library, which was bumped here to its PR branch.
The IGL change was suggested in Icinga/icinga-go-library#201.
Fixes #1098.