Skip to content

Commit

Permalink
Merge pull request #115 from mackerelio/add_alert_status_on_gone_for_…
Browse files Browse the repository at this point in the history
…monitors

Add AlertStatusOnGone for connectivity monitors.
  • Loading branch information
daiksy committed Nov 24, 2020
2 parents c9a24cf + 1a3a21c commit 44aa120
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion monitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import (
"type": "connectivity",
"isMute": false,
"scopes": [],
"excludeScopes": []
"excludeScopes": [],
"alertStatusOnGone": "WARNING"
},
{
"id" : "2cSZzK3XfmG",
Expand Down Expand Up @@ -132,6 +133,7 @@ type MonitorConnectivity struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Memo string `json:"memo,omitempty"`
AlertStatusOnGone string `json:"alertStatusOnGone,omitempty"`
Type string `json:"type,omitempty"`
IsMute bool `json:"isMute,omitempty"`
NotificationInterval uint64 `json:"notificationInterval,omitempty"`
Expand Down
4 changes: 3 additions & 1 deletion monitors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,14 @@ var testCases = []struct {
Type: "connectivity",
IsMute: false,
NotificationInterval: 0,
AlertStatusOnGone: "WARNING",
Scopes: nil,
ExcludeScopes: nil,
},
`{
"id": "2cSZzK3XfmA",
"type": "connectivity"
"type": "connectivity",
"alertStatusOnGone": "WARNING"
}`,
},
{
Expand Down

0 comments on commit 44aa120

Please sign in to comment.