diff --git a/config.yaml b/config.yaml index 8d9e7efc..2a18b403 100644 --- a/config.yaml +++ b/config.yaml @@ -1,11 +1,12 @@ metrics: true services: - - name: twinnation + - name: Twinnation url: https://twinnation.org/actuator/health - interval: 15s + interval: 30s conditions: - "[STATUS] == 200" - - name: github + - name: GitHub API url: https://api.github.com/healthz + interval: 30s conditions: - "[STATUS] == 200" \ No newline at end of file diff --git a/core/types.go b/core/types.go index 15b07a85..1940b450 100644 --- a/core/types.go +++ b/core/types.go @@ -23,7 +23,7 @@ type ServerMessage struct { type Result struct { HttpStatus int `json:"status"` Hostname string `json:"hostname"` - Ip string `json:"ip"` + Ip string `json:"-"` Duration time.Duration `json:"duration"` Errors []string `json:"errors"` ConditionResults []*ConditionResult `json:"condition-results"` @@ -88,7 +88,7 @@ func (service *Service) EvaluateConditions() *Result { type ConditionResult struct { Condition *Condition `json:"condition"` Success bool `json:"success"` - Explanation string `json:"explanation"` + Explanation string `json:"-"` } type Condition string diff --git a/static/index.html b/static/index.html index 76a389d1..e97272cc 100644 --- a/static/index.html +++ b/static/index.html @@ -4,11 +4,23 @@ Status @@ -17,19 +29,7 @@
Status
-
- - - - - - - - - - - -
NameStatusHostnameResponse time
+
@@ -38,8 +38,9 @@ diff --git a/watchdog/watchdog.go b/watchdog/watchdog.go index 08a3791f..c3a58e5b 100644 --- a/watchdog/watchdog.go +++ b/watchdog/watchdog.go @@ -27,7 +27,7 @@ func Monitor(cfg *config.Config) { metric.PublishMetricsForService(service, result) rwLock.Lock() serviceResults[service.Name] = append(serviceResults[service.Name], result) - if len(serviceResults[service.Name]) > 10 { + if len(serviceResults[service.Name]) > 20 { serviceResults[service.Name] = serviceResults[service.Name][1:] } rwLock.Unlock()