mirror of https://github.com/status-im/consul.git
consul: Provide output for serfHealth check. Fixes #176.
This commit is contained in:
parent
a88c36bdc1
commit
476339b20c
|
@ -11,11 +11,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SerfCheckID = "serfHealth"
|
SerfCheckID = "serfHealth"
|
||||||
SerfCheckName = "Serf Health Status"
|
SerfCheckName = "Serf Health Status"
|
||||||
ConsulServiceID = "consul"
|
SerfCheckAliveOutput = "Agent alive and reachable"
|
||||||
ConsulServiceName = "consul"
|
SerfCheckFailedOutput = "Agent not live or unreachable"
|
||||||
newLeaderEvent = "consul:new-leader"
|
ConsulServiceID = "consul"
|
||||||
|
ConsulServiceName = "consul"
|
||||||
|
newLeaderEvent = "consul:new-leader"
|
||||||
)
|
)
|
||||||
|
|
||||||
// monitorLeadership is used to monitor if we acquire or lose our role
|
// monitorLeadership is used to monitor if we acquire or lose our role
|
||||||
|
@ -266,6 +268,7 @@ AFTER_CHECK:
|
||||||
CheckID: SerfCheckID,
|
CheckID: SerfCheckID,
|
||||||
Name: SerfCheckName,
|
Name: SerfCheckName,
|
||||||
Status: structs.HealthPassing,
|
Status: structs.HealthPassing,
|
||||||
|
Output: SerfCheckAliveOutput,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
var out struct{}
|
var out struct{}
|
||||||
|
@ -300,6 +303,7 @@ func (s *Server) handleFailedMember(member serf.Member) error {
|
||||||
CheckID: SerfCheckID,
|
CheckID: SerfCheckID,
|
||||||
Name: SerfCheckName,
|
Name: SerfCheckName,
|
||||||
Status: structs.HealthCritical,
|
Status: structs.HealthCritical,
|
||||||
|
Output: SerfCheckFailedOutput,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
var out struct{}
|
var out struct{}
|
||||||
|
|
Loading…
Reference in New Issue