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