Versions in this module Expand all Collapse all v0 v0.1.0 Apr 10, 2019 Changes in this version + const DefaultInterval + const DefaultTimeFormat + const DefaultTimeout + const HistorySize + func CheckTCPPortAlive(ip, port string, timeout int64) (bool, error) + func GetMonitorType(t string) string + type AbstractMonitor struct + ComponentID int + Interval time.Duration + MetricID int + Name string + Strict bool + Target string + Template struct{ ... } + Threshold float32 + ThresholdCount bool + Timeout time.Duration + Type string + func (mon *AbstractMonitor) AnalyseData() + func (mon *AbstractMonitor) ClockStart(cfg *CachetMonitor, iface MonitorInterface, wg *sync.WaitGroup) + func (mon *AbstractMonitor) ClockStop() + func (mon *AbstractMonitor) Describe() []string + func (mon *AbstractMonitor) GetMonitor() *AbstractMonitor + func (mon *AbstractMonitor) Validate() []string + type CachetAPI struct + Insecure bool + Token string + URL string + func (api CachetAPI) NewRequest(requestType, url string, reqBody []byte) (*http.Response, CachetResponse, error) + func (api CachetAPI) Ping() error + func (api CachetAPI) SendMetric(id int, lag int64) + type CachetMonitor struct + API CachetAPI + DateFormat string + Immediate bool + Monitors []MonitorInterface + RawMonitors []map[string]interface{} + SystemName string + func (cfg *CachetMonitor) Validate() bool + type CachetResponse struct + Data json.RawMessage + type DNSAnswer struct + Exact string + Regex string + type DNSMonitor struct + Answers []DNSAnswer + DNS string + Question string + func (monitor *DNSMonitor) Validate() []string + type HTTPMonitor struct + ExpectedBody string + ExpectedStatusCode int + Headers map[string]string + Method string + func (mon *HTTPMonitor) Describe() []string + func (mon *HTTPMonitor) Validate() []string + type Incident struct + ComponentID int + ComponentStatus int + ID int + Message string + Name string + Notify bool + Status int + Visible int + func (incident *Incident) GetComponentStatus(cfg *CachetMonitor) (int, error) + func (incident *Incident) Send(cfg *CachetMonitor) error + func (incident *Incident) SetFixed() + func (incident *Incident) SetIdentified() + func (incident *Incident) SetInvestigating() + func (incident *Incident) SetWatching() + type MessageTemplate struct + Message string + Subject string + func (t *MessageTemplate) Compile() error + func (t *MessageTemplate) Exec(data interface{}) (string, string) + func (t *MessageTemplate) SetDefault(d MessageTemplate) + type MonitorInterface interface + ClockStart func(*CachetMonitor, MonitorInterface, *sync.WaitGroup) + ClockStop func() + Describe func() []string + GetMonitor func() *AbstractMonitor + Validate func() []string + type TCPMonitor struct + Port string + func (m *TCPMonitor) Validate() []string