add custom problem detector plugin

This commit is contained in:
Andy Xie
2017-11-22 10:14:09 +08:00
parent ffc790976b
commit 10dbfef1a8
31 changed files with 1058 additions and 76 deletions
+19
View File
@@ -76,3 +76,22 @@ type Status struct {
// newest node conditions in this field.
Conditions []Condition `json:"conditions"`
}
// Type is the type of the problem.
type Type string
const (
// Temp means the problem is temporary, only need to report an event.
Temp Type = "temporary"
// Perm means the problem is permanent, need to change the node condition.
Perm Type = "permanent"
)
// Monitor monitors log and custom plugins and reports node problem condition and event according to
// the rules.
type Monitor interface {
// Start starts the log monitor.
Start() (<-chan *Status, error)
// Stop stops the log monitor.
Stop()
}