-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support sending non-state notifications without an incident #188
base: main
Are you sure you want to change the base?
Commits on May 15, 2024
-
Determine whether an incident is new by its
StartedAt
timestampWe don't need to pass this info around methods since we can easily determine whether an incident is new based on its `StartedAt` timestamp. Co-Authored-By: Sukhwinder Dhillon <sukhwinder.dhillon@icinga.com>
Configuration menu - View commit details
-
Copy full SHA for 311ed1b - Browse repository at this point
Copy the full SHA 311ed1bView commit details -
Decouple
contactChannels
from incident packageWe're going to use this recipient channels map elsewhere outside the `incident` package in the future and it seems reasonable to me to move it here to the `rule` package.
Configuration menu - View commit details
-
Copy full SHA for 46c8084 - Browse repository at this point
Copy the full SHA 46c8084View commit details -
Introduce type
rule.RecipientMeta
In the upcoming commits, this will also be used elsewhere.
Configuration menu - View commit details
-
Copy full SHA for 8c41f87 - Browse repository at this point
Copy the full SHA 8c41f87View commit details -
In the upcoming commits, this will also be used elsewhere.
Configuration menu - View commit details
-
Copy full SHA for 1d8ae0a - Browse repository at this point
Copy the full SHA 1d8ae0aView commit details -
Implement
zapcore.ObjectMarshaler
forrule.Escalation
& `recipien……t.Key` This allows us to use `zap.Inline(escalation)` or `zap.Object("escalation", escalation)`wherever more logging context is needed without having to add all the individual fields ourselves each time.
Configuration menu - View commit details
-
Copy full SHA for e939e26 - Browse repository at this point
Copy the full SHA e939e26View commit details -
It will be used to determine non-state notification recipients without an incident.
Configuration menu - View commit details
-
Copy full SHA for 4366dcc - Browse repository at this point
Copy the full SHA 4366dccView commit details -
Load
rule.Routing
&rule.RoutingRecipients
in runtime configGiven that these configs are user-configurable, they need to be loaded regulary from the database just like the other types. I have also already taken careful consideration to deduplicate as much code as possible.
Configuration menu - View commit details
-
Copy full SHA for 259e1f4 - Browse repository at this point
Copy the full SHA 259e1f4View commit details -
Move superfluous event error type to
event
package & add another er……ror type Otherwise, we will have a cyclic import error with the upcoming changes to non-state event processing support. They kind of also fit into this package.
Configuration menu - View commit details
-
Copy full SHA for d9e344c - Browse repository at this point
Copy the full SHA d9e344cView commit details -
Drop
incident#AddHistory()
methodIt was already quite annoying having to return `types.Int` every single time this method was used. This commit embeds the functionality for `insert and fetch ID` directly into the `HistoryRow` type and nowhere needs to be returned. The just inserted and fetched ID can be accessed with `history.ID`.
Configuration menu - View commit details
-
Copy full SHA for e505946 - Browse repository at this point
Copy the full SHA e505946View commit details -
Allow to send notifications without an active incident
I also replaced `errors` with `github/pkg/errors` package, is it was quite challenging to track down the errors, as we only get messages without stack traces with the standard errors package.
Configuration menu - View commit details
-
Copy full SHA for 49b112b - Browse repository at this point
Copy the full SHA 49b112bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e81c5c3 - Browse repository at this point
Copy the full SHA e81c5c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2fc42d - Browse repository at this point
Copy the full SHA b2fc42dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 17b3122 - Browse repository at this point
Copy the full SHA 17b3122View commit details -
Drop
incident_event
table &incident#ProcessEvent()
functionThe `incident_event` table is now obsolete and is no longer required, and the `incident#ProcessEvent()` method has been replaced by the new `events.Router` type.
Configuration menu - View commit details
-
Copy full SHA for 39bf393 - Browse repository at this point
Copy the full SHA 39bf393View commit details -
Co-Authored-By: Sukhwinder Dhillon <sukhwinder.dhillon@icinga.com>
Configuration menu - View commit details
-
Copy full SHA for 11b142c - Browse repository at this point
Copy the full SHA 11b142cView commit details