Documentation ¶
Index ¶
Constants ¶
const ( // MessageNotCheckedYet means that no checks have been run yet. MessageNotCheckedYet = "Not checked yet" // MessagePatternNotFound means that the searched pattern has not been found. MessagePatternNotFound = "Pattern not found" // MessageOK means a successful check. MessageOK = "OK" // StatusDanger set the background of node tile to red. StatusDanger = "danger" // StatusSuccess set the background of node tile to green. StatusSuccess = "success" // StatusWarning set the background of node tile to yellow. StatusWarning = "warning" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check interface { Initialize(monitoringConfiguration *monitoring.Configuration, nodeConfig *monitoring.Node) Run() CheckResult }
Check describes the basic interface of every health check.
func MakeInstance ¶
MakeInstance method creates a new instance of check based on a given name.
type CheckResult ¶
CheckResult represents a result of an executed health check.
type HTTPCheck ¶
type HTTPCheck struct {
// contains filtered or unexported fields
}
HTTPCheck performs a simple check against an HTTP endpoint.
func (*HTTPCheck) Initialize ¶
func (h *HTTPCheck) Initialize(monitoringConfiguration *monitoring.Configuration, nodeConfig *monitoring.Node)
Initialize method initializes the check instance.
func (*HTTPCheck) Run ¶
func (h *HTTPCheck) Run() CheckResult
Run method executes the check. This is invoked periodically.
type PingCheck ¶
type PingCheck struct {
// contains filtered or unexported fields
}
PingCheck is ICMP health check. This check requires CAP_NET_RAW capability or to be run as root user.
func (*PingCheck) Initialize ¶
func (p *PingCheck) Initialize(monitoringConfiguration *monitoring.Configuration, nodeConfig *monitoring.Node)
Initialize method initializes the check instance.
func (*PingCheck) Run ¶
func (p *PingCheck) Run() CheckResult
Run method executes the check. This is invoked periodically.
type SampleCheck ¶
type SampleCheck struct {
// contains filtered or unexported fields
}
SampleCheck is a sample health check, comparing the current day with a "green" day.
func (*SampleCheck) Initialize ¶
func (s *SampleCheck) Initialize(monitoringConfiguration *monitoring.Configuration, nodeConfig *monitoring.Node)
Initialize method initializes the check instance.
func (*SampleCheck) Run ¶
func (s *SampleCheck) Run() CheckResult
Run method executes the check. This is invoked periodically.
type TLSCheck ¶
type TLSCheck struct {
// contains filtered or unexported fields
}
TLSCheck is a TLS certificate health check. The implementation bases on project - github.com/timewasted/go-check-certs
func (*TLSCheck) Initialize ¶
func (t *TLSCheck) Initialize(monitoringConfiguration *monitoring.Configuration, nodeConfig *monitoring.Node)
Initialize method initializes the check instance.
func (*TLSCheck) Run ¶
func (t *TLSCheck) Run() CheckResult
Run method executes the check. This is invoked periodically.