Skip to content

Commit

Permalink
Add support for Kafka alert node
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredscheib committed May 9, 2018
1 parent de087dc commit a689d88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion kapacitor.go
Expand Up @@ -22,7 +22,8 @@ type AlertNodes struct {
Alerta []*Alerta `json:"alerta"` // Alerta will send alert to all Alerta
OpsGenie []*OpsGenie `json:"opsGenie"` // OpsGenie will send alert to all OpsGenie
OpsGenie2 []*OpsGenie `json:"opsGenie2"` // OpsGenie2 will send alert to all OpsGenie v2
Talk []*Talk `json:"talk"` // Talk will send alert to all Talk
Talk []*Talk `json:"talk"` // Talk will send alert to all Talk
Kafka []*Kafka `json:"kafka"` // Kafka will send alert to all Kafka
}

// Post will POST alerts to a destination URL
Expand Down Expand Up @@ -135,6 +136,13 @@ type OpsGenie struct {
// Talk sends alerts to Jane Talk (https://jianliao.com/site)
type Talk struct{}

// Kafka sends alerts to any Kafka brokers specified in the handler config
type Kafka struct {
Cluster string `json:"cluster"`
Topic string `json:"topic"`
Template string `json:"template"`
}

// MarshalJSON converts AlertNodes to JSON
func (n *AlertNodes) MarshalJSON() ([]byte, error) {
type Alias AlertNodes
Expand Down
3 changes: 2 additions & 1 deletion vendor/github.com/influxdata/kapacitor/pipeline/alert.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a689d88

Please sign in to comment.