Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendAlert ¶ added in v1.0.0
func SendAlert(event *AlertDedupEvent) error
func Setup ¶ added in v1.0.0
func Setup()
Setup parses the environment and builds the AWS and http clients.
func Store ¶ added in v1.0.0
func Store(event *AlertDedupEvent) error
Types ¶
type Alert ¶
type Alert struct {
ID string `dynamodbav:"id,string"`
TimePartition string `dynamodbav:"timePartition,string"`
AlertDedupEvent
}
Alert contains all the fields associated to the alert stored in DDB
type AlertDedupEvent ¶
type AlertDedupEvent struct {
RuleID string `dynamodbav:"ruleId,string"`
RuleVersion string `dynamodbav:"ruleVersion,string"`
DeduplicationString string `dynamodbav:"dedup,string"`
AlertCount int64 `dynamodbav:"-"` // Not storing this field in DDB
CreationTime time.Time `dynamodbav:"creationTime,string"`
UpdateTime time.Time `dynamodbav:"updateTime,string"`
EventCount int64 `dynamodbav:"eventCount,number"`
Severity string `dynamodbav:"severity,string"`
LogTypes []string `dynamodbav:"logTypes,stringset"`
Title *string `dynamodbav:"title,string,omitempty"`
}
AlertDedupEvent represents the event stored in the alert dedup DDB table by the rules engine
func FromDynamodDBAttribute ¶
func FromDynamodDBAttribute(input map[string]events.DynamoDBAttributeValue) (event *AlertDedupEvent, err error)
Click to show internal directories.
Click to hide internal directories.