mirror of https://github.com/statping/statping
parent
9925b49a9c
commit
72a4fcff44
|
@ -18,7 +18,7 @@ services:
|
|||
|
||||
env:
|
||||
global:
|
||||
- VERSION=0.28.2
|
||||
- VERSION=0.28.3
|
||||
- DB_HOST=localhost
|
||||
- DB_USER=travis
|
||||
- DB_PASS=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM alpine:latest
|
||||
|
||||
ENV VERSION=v0.28.2
|
||||
ENV VERSION=v0.28.3
|
||||
|
||||
RUN apk --no-cache add libstdc++ ca-certificates
|
||||
RUN wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \
|
||||
|
|
|
@ -39,6 +39,10 @@ func (s *Service) Check() *Service {
|
|||
Timeout: 30 * time.Second,
|
||||
}
|
||||
response, err := client.Get(s.Domain)
|
||||
if err != nil {
|
||||
s.Failure(fmt.Sprintf("HTTP Error %v", err))
|
||||
return s
|
||||
}
|
||||
response.Header.Set("User-Agent", "StatupMonitor")
|
||||
t2 := time.Now()
|
||||
s.Latency = t2.Sub(t1).Seconds()
|
||||
|
|
Loading…
Reference in New Issue