diff --git a/monitor.go b/monitor.go index b556d0b..fbe7927 100644 --- a/monitor.go +++ b/monitor.go @@ -29,9 +29,8 @@ type Monitor struct { ComponentID int `json:"component_id"` // Threshold = percentage - Threshold float32 `json:"threshold"` - // Saturat - ExpectedStatusCode int `json:"expected_status_code"` + Threshold float32 `json:"threshold"` + ExpectedStatusCode int `json:"expected_status_code"` // compiled to Regexp ExpectedBody string `json:"expected_body"` bodyRegexp *regexp.Regexp diff --git a/readme.md b/readme.md index aa0a9fb..703696b 100644 --- a/readme.md +++ b/readme.md @@ -82,3 +82,10 @@ We made this tool because we felt the need to have our own monitoring software ( The idea is a stateless program which collects data and pushes it to a central cachet instance. This gives us power to have an army of geographically distributed loggers and reveal issues in both latency & downtime on client websites. + +Package usage +------------- + +When using `cachet-monitor` as a package in another program, you should follow what `cli/main.go` does. It is important to call `ValidateConfiguration` on `CachetMonitor` and all the monitors inside. + +[API Documentation](https://godoc.org/github.com/CastawayLabs/cachet-monitor)