Skip to content

Commit

Permalink
update changelog for influxdata#139
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc committed Jan 13, 2016
1 parent f3a622e commit a6374e8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Features
- [#138](https://github.com/influxdata/kapacitor/issues/138): Change over to influxdata github org.
- [#139](https://github.com/influxdata/kapacitor/issues/139): Alerta.io support thanks! @md14454

### Bugfixes

Expand Down
4 changes: 2 additions & 2 deletions cmd/kapacitord/run/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Config struct {
PagerDuty pagerduty.Config `toml:"pagerduty"`
Slack slack.Config `toml:"slack"`
HipChat hipchat.Config `toml:"hipchat"`
Alerta alerta.Config `toml:"alerta"`
Alerta alerta.Config `toml:"alerta"`
Reporting reporting.Config `toml:"reporting"`
Stats stats.Config `toml:"stats"`

Expand All @@ -76,7 +76,7 @@ func NewConfig() *Config {
c.PagerDuty = pagerduty.NewConfig()
c.Slack = slack.NewConfig()
c.HipChat = hipchat.NewConfig()
c.Alerta = alerta.NewConfig()
c.Alerta = alerta.NewConfig()
c.Reporting = reporting.NewConfig()
c.Stats = stats.NewConfig()

Expand Down
46 changes: 23 additions & 23 deletions integrations/streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1372,33 +1372,33 @@ func TestStream_AlertAlerta(t *testing.T) {
Event string `json:"event"`
Environment string `json:"environment"`
Text string `json:"text"`
Origin string `json:"origin"`
Origin string `json:"origin"`
}
pd := postData{}
dec := json.NewDecoder(r.Body)
dec.Decode(&pd)

if requestCount == 1 {
if exp := "/alert?api-key=testtoken1234567"; r.URL.String() != exp {
t.Errorf("unexpected url got %s exp %s", r.URL.String(), exp)
}
if exp := "production"; pd.Environment != exp {
t.Errorf("unexpected environment got %s exp %s", pd.Environment, exp)
}
if exp := "Kapacitor"; pd.Origin != exp {
t.Errorf("unexpected origin got %s exp %s", pd.Origin, exp)
}
} else {
if exp := "/alert?api-key=anothertesttoken"; r.URL.String() != exp {
t.Errorf("unexpected url got %s exp %s", r.URL.String(), exp)
}
if exp := "development"; pd.Environment != exp {
t.Errorf("unexpected environment got %s exp %s", pd.Environment, exp)
}
if exp := "override"; pd.Origin != exp {
t.Errorf("unexpected origin got %s exp %s", pd.Origin, exp)
}
}
if requestCount == 1 {
if exp := "/alert?api-key=testtoken1234567"; r.URL.String() != exp {
t.Errorf("unexpected url got %s exp %s", r.URL.String(), exp)
}
if exp := "production"; pd.Environment != exp {
t.Errorf("unexpected environment got %s exp %s", pd.Environment, exp)
}
if exp := "Kapacitor"; pd.Origin != exp {
t.Errorf("unexpected origin got %s exp %s", pd.Origin, exp)
}
} else {
if exp := "/alert?api-key=anothertesttoken"; r.URL.String() != exp {
t.Errorf("unexpected url got %s exp %s", r.URL.String(), exp)
}
if exp := "development"; pd.Environment != exp {
t.Errorf("unexpected environment got %s exp %s", pd.Environment, exp)
}
if exp := "override"; pd.Origin != exp {
t.Errorf("unexpected origin got %s exp %s", pd.Origin, exp)
}
}
if exp := "serverA"; pd.Resource != exp {
t.Errorf("unexpected resource got %s exp %s", pd.Resource, exp)
}
Expand Down Expand Up @@ -1444,7 +1444,7 @@ stream

c := alerta.NewConfig()
c.URL = ts.URL
c.Origin = "Kapacitor"
c.Origin = "Kapacitor"
sl := alerta.NewService(c, logService.NewLogger("[test_alerta] ", log.LstdFlags))
tm.AlertaService = sl

Expand Down
17 changes: 8 additions & 9 deletions pipeline/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,30 +614,29 @@ type AlertaHandler struct {

// Alerta authentication token.
// If empty uses the token from the configuration.
Token string
Token string

// Alerta resource.
// This is a required field.
Resource string
// This is a required field.
Resource string

// Alerta event.
// This is a required field.
Event string
Event string

// Alerta environment.
// If empty uses the environment from the configuration.
Environment string
Environment string

// Alerta group.
Group string
Group string

// Alerta value.
Value string
Value string

// Alerta origin.
// If empty uses the origin from the configuration.
Origin string

Origin string
}

// Send the alert to Slack.
Expand Down
22 changes: 11 additions & 11 deletions services/alerta/config.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package alerta

type Config struct {
// Whether Alerta integration is enabled.
Enabled bool `toml:"enabled"`
// The Alerta URL.
URL string `toml:"url"`
// The authentication token for this notification, can be overridden per alert.
Token string `toml:"token"`
// The environment in which to raise the alert.
Environment string `toml:"environment"`
// The origin of the alert.
Origin string `toml:"origin"`
// Whether Alerta integration is enabled.
Enabled bool `toml:"enabled"`
// The Alerta URL.
URL string `toml:"url"`
// The authentication token for this notification, can be overridden per alert.
Token string `toml:"token"`
// The environment in which to raise the alert.
Environment string `toml:"environment"`
// The origin of the alert.
Origin string `toml:"origin"`
}

func NewConfig() Config {
return Config{}
return Config{}
}

0 comments on commit a6374e8

Please sign in to comment.