1
0
Fork 0

Merge v1.2.1-master

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-04-11 17:10:46 +02:00
parent a590155b0b
commit aeb17182b4
No known key found for this signature in database
GPG key ID: D808B4C167352E59
396 changed files with 27271 additions and 9969 deletions

View file

@ -19,10 +19,10 @@ type Job struct {
Config Config `json:"config"`
// The current status of the monitor.
Status map[string]Status `json:"status,omitempty"`
Status map[string]*Status `json:"status,omitempty"`
// Rules for determining failure conditions.
Rules []*Rule `json:"rules"`
Rules []*Rule `json:"rules,omitempty"`
// List of regions in which to run the monitor.
// eg, ["dal", "sin", "sjc", "lga", "ams"]
@ -66,7 +66,7 @@ type Job struct {
// If true, notifications are sent for any regional failure (and failback if desired),
// in addition to global state notifications.
NotifyRegional bool `json:"notidy_regional"`
NotifyRegional bool `json:"notify_regional"`
// If true, a notification is sent when a job returns to an "up" state.
NotifyFailback bool `json:"notify_failback"`
@ -99,6 +99,15 @@ type Status struct {
Status string `json:"status"`
}
// StatusLog wraps an NS1 /monitoring/history resource
type StatusLog struct {
Job string `json:"job"`
Region string `json:"region"`
Status string `json:"status"`
Since int `json:"since"`
Until int `json:"until"`
}
// Rule wraps an element of a Job's "rules" attribute
type Rule struct {
Key string `json:"key"`