-
Story
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
False
-
None
-
Unset
-
None
-
Undefined
After looking at the Advisor instant email template and our needs for Policies instant email, we want a single email for a collection of Advisor recommendations or Policies...
After talking to rhjmarc , we think we'd want that applications send us a list of payloads in a single message.
We'd like to make the change before going to Prod (so we won't do the migration on April 13th but rather do this right from the beginning, even if that means shifting the go-to-prod)
So we need:
- Define what's the new message format looks like
- Policies engine to collect all triggered policies for 1 system payload and send this in a single message
- Get notification-backend to send the content of the payload as-is in a webhook (we may later provide the option to split this in multiple webhooks)
- Update the Policies Instant email to show the N recommendations for 1 system
- Update how the Policies Daily email is built accordingly
(For Advisor, we'll remove the 4 event types and just have 1 for any level of "risk", and Advisor will send us a single message with all recommendations for 1 system)
So the new message format needs to take into account that we have a list of things (policies, recommendation) now, and we need to prepare to have metadata about each individual "thing", we may want to add a "level" per "thing" later on, so that people can subscribe only to "things" of a particular level, or we may want to add a "resource_id" so that people can say for "resource_id" "x" ping some particular people.
We only need to be prepared for the extra metadata so that the format won't change.
So something like this (There may be better names for "items","metadata" and "payload")
{
"bundle": "rhel",
"application": "policies",
"event_type": "policy-triggered",
"timestamp": "2020-12-08T09:31:39Z",
"account_id": "000000",
"items": [
{
"metadata": { "future" : "proof" },
"payload": { "any" : "thing", "we": 1, "want" : "here" }
},
{
"metadata": { "future" : "proof" },
"payload": { "any" : "thing", "we": 1, "want" : "here" }
}]
}
- relates to
-
POL-484 Collect all policies triggered to a system before sending them to notifications
-
- Closed
-